Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-13-2012, 11:09 PM   #1
Registered User
Join Date: Apr 2012
Posts: 5
Default cant get form to work

im creating a website made of flash i cant get the form to work i have var and name on the boxes and the following action on the submit button on release geturl to link to the processing form ie name box has the var name assigned to it now releasing the button sends the mail but none of the info is there it looks like this always empty.
is there anyway to get the processing script completely in action script? or to get my form working?
Phone Number:
Email Address:
End of message

here is the php


if (!isset($_POST['submit'])) {
echo "<h1>Error</h1>\n
<p>Accessing this page directly is not allowed.</p>";

$email = preg_replace("([\r\n])", "", $email);

$find = "/(content-type|bcc:|cc/i";
if (preg_match($find, $name) || preg_match($find, $email) || preg_match($find, $url) || preg_match($find, $comments)) {
echo "<h1>Error</h1>\n
<p>No meta/header injections, please.</p>";

/* form will be sent to these email addresses */
$myemail = "name@gmail.com";

/* headers*//*this syntax makes it show up inbox not spam*/
$subject = "subject here";
$headers = 'From:name@gmail.com' . "\r\n" .
'Cc:name@gmail.com' . "\r\n" .
'Bcc:name@gmail.com' . "\r\n" .
'Reply-To:name@gmail.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

/* syntax// $php item = $action ['$value on form'];*/
/* defines whats included in mail message */
$name = $_POST ['name'];
$phone = $_POST ['phone'];
$email = $_POST ['email'];

$comments = $_POST ['comments'];

/* message how I want it to appear inbox*/
/* defines what form items are*/
$message = "
Name: $name
Phone Number: $phone
Email Address: $email
message: $comments
End of message

/* Send the message using mail() function */

/* Redirect visitor to the thank you page */
header('Location: url');


Last edited by bumpn; 04-13-2012 at 11:14 PM.
bumpn is offline   Reply With Quote
Old 04-13-2012, 11:26 PM   #2
Registered User
Join Date: Apr 2012
Posts: 5

the max character option on the var was set to 0. my work is at work cant test it could this be it?
bumpn is offline   Reply With Quote
Old 04-14-2012, 11:01 AM   #3
Prid - Outing
Prid's Avatar
Join Date: Oct 2009
Location: Halden, Norway
Posts: 1,196
Send a message via MSN to Prid Send a message via Skype™ to Prid

Everything seems OK, so it must be something wrong in your Flash file, as it's probably not sending the variables to the PHP file, and if I read correctly, you said that you used getURL to navigate to the PHP page? If so, then that's completely wrong, as that won't send any variables. Instead of getURL, try this code:

ActionScript Code:
loadVariables("yourphpfile.php", this, "POST");

See if that works. Max Chars set to 0 means that there's no limit to how many characters you can type, so that's not wrong, and no, you can't send a mail using completely Flash!
I have returned, and am now 18
Prid is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 12:03 AM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.