Page 1 of 1

PHP email form

Posted: Fri Jun 06, 2008 4:12 am
by ville
Hi all,

Im creating a form in flash (AS 2.0) that sends an email with PHP.

The code functioned fine until I changed the varialbe names of textboxes in the swf from "FirstName" and "Email" to "_global.FirstName" and "_global.Email".

Now the email form does not include any of the textbox data from flash.

Any help with how to fix this problem would be much appreciated..

I,ve included my php code with this post:

--------------------------------------------------------------------

Code: Select all

 
 <?
$FirstName = $_POST['_global.FirstName'];
$Email = $_POST['_global.Email'];
$Company = $_POST['_global.Company'];
 
$from = "$FirstName";
$ToEmail = "blaa@gmail.com";
##$ToName = "Blaa person";
$ToSubject = "Blaa Donation";
 
$EmailBody = "The following data displays details:\n\nDonator's Name: $FirstName\nDonator's Company: $Company;\nDonator's Email: $Email\n\n";
 
$EmailFooter="Thank You";
$Message = $EmailBody.$EmailFooter;
 
mail($ToName." <".$ToEmail.">",$ToSubject, $Message, "From: ".$from." <".$Email.">");
 
Print "_root.EmailStatus=Complete - Your details have been sent to us";
?>
 

Re: PHP email form

Posted: Fri Jun 06, 2008 8:54 am
by vargadanis
Try to dump the contents of $_POST with print_r

Code: Select all

echo "<pre>"; print_r($_POST); echo "</pre>";