I created a form in flash mx and then created the PHP code to process the form. Every thing works great and all the information from my form is being sent to my email address. However, every time I receive a message from my form in my email, the “FROM” heading says “designisessential.com”. This is the url of my site. I wan’t the “FROM” heading to say the persons name that filled out my form instead of the url. I know this can be done. I think it has to do with using the variable “name” which I set up in the flash form and assign this to the “FROM” heading in the PHP code. I am not sure how to do this. Here is my current PHP code.
<?php
$sendTo = "steresa2001@yahoo.com";
$subject = “Sandra Leigh Photos”;
$headers = "From: " . $_POST[“name”];
$headers .= “<” . $_POST[“email”] . ">
";
“Comment: " . $_POST[“message”] .”>
";
“ADDRESS: " . $_POST[“address”] .”>
";
“CITY: " . $_POST[“city”] .”>
";
“STATE: " . $_POST[“state”] .”>
";
“PHONE: " . $_POST[“phone”] .”>
";
“ZIP: " . $_POST[“zip”] .”>
";
“EMAIL: " . $_POST[“email”] .”>
";
“INQUIRY: " . $_POST[“inquiry”] .”>
";
“REFERRED: " . $_POST[“referred”] .”>
";
$message = $_POST[“message”];
mail($sendTo, $subject, "COMMENT: $message
" . "CITY: $city
". "STATE: $state
". "ADDRESS: $address
". "ZIP: $zip
". "INQUIRY: $inquiry
". "REFERRED: $referred
". "PHONE: $phone
". $headers, "$From: ");
?>