email form problem
Posted: Tue Mar 18, 2008 9:42 pm
I am sending form data to an email. When I receive the email all I get is:
<br><hr><br>
Notify1: <br>
First Name: <br>
Last Name: <br>
City: <br>
Zip: <br>
Notify2: <br>
Notify3: <br>
Notify4: <br>
Notify5: <br>
Notify6: <br>
Comments: <br>
Instead of seeing the entered data
Here is my php:
I am quite sure there is something simple here, but I can't find it. Please help
<br><hr><br>
Notify1: <br>
First Name: <br>
Last Name: <br>
City: <br>
Zip: <br>
Notify2: <br>
Notify3: <br>
Notify4: <br>
Notify5: <br>
Notify6: <br>
Comments: <br>
Instead of seeing the entered data
Here is my php:
Code: Select all
<?php
/* Subject and Email Information */
$emailSubject = 'OneCallNow Form';
$webMaster = 'me@me.com';
/* Data Variables */
$notify1Field = $_POST['notify1'];
$firstNameField = $_POST['first_name'];
$lastNameField = $_POST['last_name'];
$address1Field = $_POST['address1'];
$address2Field = $_POST['address2'];
$cityField = $_POST['city'];
$zipField = $_POST['zip'];
$notify2Field = $_POST['notify2'];
$notify3Field = $_POST['notify3'];
$notify4Field = $_POST['notify4'];
$notify5Field = $_POST['notify5'];
$notify6Field = $_POST['notify6'];
$commentsField = $_POST['comments'];
$body = <<<EOD
<br><hr><br>
Notify1: $notify1 <br>
First Name: $firstNameField <br>
Last Name: $lastNameField <br>
City: $cityField <br>
Zip: $zipField <br>
Notify2: $notify2Field <br>
Notify3: $notify3Field <br>
Notify4: $notify4Field <br>
Notify5: $notify5Field <br>
Notify6: $notify6Field <br>
Comments: $commentsField <br>
EOD;
$headers = "FROM: $notify1\r\n";
$headers .= "Content-type: text/html\r\n";
$success = mail($webMaster, $emailSubject, $body, $headers);
/* Results Rendered as HTML */
$theResults = <<<EOD
EOD;
echo "$theResults";
?>