joebuzz83
01-19-2010, 08:08 AM
Hi all,
I have been working on this script trying to make it work for days now, and have a deadline coming up. I am not a coder per se and cannot pinpoint the problem that is affecting this script:
<?php
if ($_POST["email"]<>'') {
$ToEmail = 'joebuzz83@gmail.com';
$EmailSubject = 'Site contact form ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["testingheader"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY .= "First Name: ".$_POST["fname"]."<br>";
$MESSAGE_BODY .= "Last Name: ".$_POST["lname"]."<br>";
$MESSAGE_BODY .= "Address: ".$_POST["address"]."<br>";
$MESSAGE_BODY .= "Address Cont: ".$_POST["address2"]."<br>";
$MESSAGE_BODY .= "City: ".$_POST["city"]."<br>";
$MESSAGE_BODY .= "State: ".$_POST["state"]."<br>";
$MESSAGE_BODY .= "Zip: ".$_POST["zip"]."<br>";
$MESSAGE_BODY .= "Home Phone: ".$_POST["homenum"]."<br>";
$MESSAGE_BODY .= "Cell Phone: ".$_POST["cellnum"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "How did you hear about the Event? ".nl2br($_POST["comment"])."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
Your message was sent
<?php
} else {
?>
<form action="registration1.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">First name:</td>
<td width="71%"><input name="fname" type="text" id="fname" size="32"></td>
</tr>
<tr>
<td width="29%" class="bodytext">Last name:</td>
<td width="71%"><input name="lname" type="text" id="lname" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Address:</td>
<td width="71%"><input name="address" type="text" id="address" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Address cont.:</td>
<td width="71%"><input name="address2" type="text" id="address2" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">City:</td>
<td width="71%"><input name="city" type="text" id="city" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">State:</td>
<td width="71%"><input name="state" type="text" id="state" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Zip:</td>
<td width="71%"><input name="zip" type="text" id="zip" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Home Phone:</td>
<td width="71%"><input name="homenum" type="text" id="homenum" size="32"></td>
</tr>
<tr>
<td width="29%" class="bodytext">Cell Phone:</td>
<td width="71%"><input name="cellnum" type="text" id="cellnum" size="32"></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">How did you hear about the Event?</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form>
<?php
};
?>
It is only posting the cellnum, email and "How did you hear about the Event?" fields. \
I'm sorry if this has been answered many times before.
I have been working on this script trying to make it work for days now, and have a deadline coming up. I am not a coder per se and cannot pinpoint the problem that is affecting this script:
<?php
if ($_POST["email"]<>'') {
$ToEmail = 'joebuzz83@gmail.com';
$EmailSubject = 'Site contact form ';
$mailheader = "From: ".$_POST["email"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["testingheader"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY .= "First Name: ".$_POST["fname"]."<br>";
$MESSAGE_BODY .= "Last Name: ".$_POST["lname"]."<br>";
$MESSAGE_BODY .= "Address: ".$_POST["address"]."<br>";
$MESSAGE_BODY .= "Address Cont: ".$_POST["address2"]."<br>";
$MESSAGE_BODY .= "City: ".$_POST["city"]."<br>";
$MESSAGE_BODY .= "State: ".$_POST["state"]."<br>";
$MESSAGE_BODY .= "Zip: ".$_POST["zip"]."<br>";
$MESSAGE_BODY .= "Home Phone: ".$_POST["homenum"]."<br>";
$MESSAGE_BODY .= "Cell Phone: ".$_POST["cellnum"]."<br>";
$MESSAGE_BODY .= "Email: ".$_POST["email"]."<br>";
$MESSAGE_BODY .= "How did you hear about the Event? ".nl2br($_POST["comment"])."<br>";
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
?>
Your message was sent
<?php
} else {
?>
<form action="registration1.php" method="post">
<table width="400" border="0" cellspacing="2" cellpadding="0">
<tr>
<td width="29%" class="bodytext">First name:</td>
<td width="71%"><input name="fname" type="text" id="fname" size="32"></td>
</tr>
<tr>
<td width="29%" class="bodytext">Last name:</td>
<td width="71%"><input name="lname" type="text" id="lname" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Address:</td>
<td width="71%"><input name="address" type="text" id="address" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Address cont.:</td>
<td width="71%"><input name="address2" type="text" id="address2" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">City:</td>
<td width="71%"><input name="city" type="text" id="city" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">State:</td>
<td width="71%"><input name="state" type="text" id="state" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Zip:</td>
<td width="71%"><input name="zip" type="text" id="zip" size="32"></td>
</tr><tr>
<td width="29%" class="bodytext">Home Phone:</td>
<td width="71%"><input name="homenum" type="text" id="homenum" size="32"></td>
</tr>
<tr>
<td width="29%" class="bodytext">Cell Phone:</td>
<td width="71%"><input name="cellnum" type="text" id="cellnum" size="32"></td>
</tr>
<tr>
<td class="bodytext">Email address:</td>
<td><input name="email" type="text" id="email" size="32"></td>
</tr>
<tr>
<td class="bodytext">How did you hear about the Event?</td>
<td><textarea name="comment" cols="45" rows="6" id="comment" class="bodytext"></textarea></td>
</tr>
<tr>
<td class="bodytext"> </td>
<td align="left" valign="top"><input type="submit" name="Submit" value="Send"></td>
</tr>
</table>
</form>
<?php
};
?>
It is only posting the cellnum, email and "How did you hear about the Event?" fields. \
I'm sorry if this has been answered many times before.