I've been trying to get the "From" filled in on my email delivery after the form is filled out. I kept getting email from "Nobody", but I really wanted a name or email address. I read every post on this board, and couldn't get anything to work. I finally found the answer tonight, and it came from following the directions to the letter. The key is, the format for mail() is:
$to
$subject
$message
$headers
If you set it up like this: mail($to,$subject,$headers, "Form data: -you will fail.
If you set it up like this: mail($to,$subject, Form data, $headers -you will fail.
You need to set it up like this:
$to= "employment5@suddenserviceonline.com,employment@suddenserviceonline.com";
$subject= "Employment Application";
$headers = "From: " . $_POST['field_136'];
mail($to,$subject, "Form data:
{all your form data here}
THEN at the bottom, just before the closing ) put your $headers.
Last Name: " . $_POST['field_1'] . "
First Name: " . $_POST['field_2'] . "
(blah, blah, blah {form data})
",$headers);
include("confirm.html");
?>
I hope this helps somebody. It worked for me.
PS - This is a GREAT form builder !!!! Disproves the theory "you get what you pay for" !!! A little effort, and you'll come up with a great working form.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I've been trying to get the "From" filled in on my email delivery after the form is filled out. I kept getting email from "Nobody", but I really wanted a name or email address. I read every post on this board, and couldn't get anything to work. I finally found the answer tonight, and it came from following the directions to the letter. The key is, the format for mail() is:
$to
$subject
$message
$headers
If you set it up like this: mail($to,$subject,$headers, "Form data: -you will fail.
If you set it up like this: mail($to,$subject, Form data, $headers -you will fail.
You need to set it up like this:
$to= "employment5@suddenserviceonline.com,employment@suddenserviceonline.com";
$subject= "Employment Application";
$headers = "From: " . $_POST['field_136'];
mail($to,$subject, "Form data:
{all your form data here}
THEN at the bottom, just before the closing ) put your $headers.
Mine looks like this:
$to= "xxxx@xxxxonline.com,xxx@xxxxonline.com";
$subject= "your subject here";
$headers = "From: " . $_POST['field_##'];
mail($to,$subject, "Form data:
Last Name: " . $_POST['field_1'] . "
First Name: " . $_POST['field_2'] . "
(blah, blah, blah {form data})
",$headers);
include("confirm.html");
?>
I hope this helps somebody. It worked for me.
PS - This is a GREAT form builder !!!! Disproves the theory "you get what you pay for" !!! A little effort, and you'll come up with a great working form.