Jump to content

Help Please - PHP - Flash Sendmail Form Troubleshooting


Someguy20

Recommended Posts

I'm trying to create a simple sendmail form in Flash. The only input text field I'm asking for is an email address for users to sign up to receive a monthly newsletter. Attached to the submit button in flash is this script:

 

on (release) {

    if (!Email.length || Email.indexOf("@") == -1 || Email.indexOf(".") == -1) {

EmailStatus = "Please enter a valid E-mail address";

}

 

else {

loadVariablesNum ("snowMailPHP.php", "0", "Post");

        EmailStatus = "Your email is being sent. Please wait a moment...";

 

}

}

 

There's a dynamic textbox with the variable emailstatus to let users know whats going on with their submission (it's also been very helpful with debugging).

 

The submit button accesses a PHP file using the post method which contains the following script, which I acquired from a tutorial. I've modified it a bit from the tutorial to make it simpler because in the tutorial there were multiple fields and all I need is an email address to be sent to me so that I can get a list of subscribers. Here is the code in my PHP file:

 

<?

 

$ToEmail = "[email protected]";

 

$ToName = "Harry";

 

$ToSubject = "Newsletter Subscription";

 

$EmailBody = "Add this subscriber to the list of newsletter subscribers:\n $Email";

 

$Message = $EmailBody;

 

mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: <".$Email.">");

 

Print "_root.Mail.EmailStatus=Complete - Your mail has been sent";

 

?>

 

After I click the submit button, the dynamic text field idles on "Your email is being sent, please wait a moment..."

 

Here is the URL I've been testing it at: www.communityxing.org/flash/test.html

 

[attachment deleted by admin]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.