PHP email form

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
ville
Forum Newbie
Posts: 1
Joined: Fri Jun 06, 2008 3:58 am

PHP email form

Post 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";
?>
 
User avatar
vargadanis
Forum Contributor
Posts: 158
Joined: Sun Jun 01, 2008 3:48 am
Contact:

Re: PHP email form

Post by vargadanis »

Try to dump the contents of $_POST with print_r

Code: Select all

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