Form wont send
Posted: Fri Oct 09, 2009 10:34 am
Hey guys my form validates well but when everything in the form is filled out it wont send it just reloads the form with my info still in it and i cant seem to figure out why im sure its simple.
Code: Select all
if (isset($_POST['$contents'] )) {
$contents .= "name, Email, phone, details";
$ToEmail .= 'brendan@designpilotonline.com';
$EmailSubject .= 'Quote Form';
$mailheader .= "From: ".$_POST["name"]."\r\n";
$mailheader .= "Reply-To: ".$_POST["Email"]."\r\n";
$mailheader .= "Content-type: text/html; charset=iso-8859-1\r\n";
$MESSAGE_BODY .= "Name/Company: ".$_POST["name"]."<br />";
$MESSAGE_BODY .= "Email: ".$_POST["Email"]."<br />";
$MESSAGE_BODY .= "Phone: ".$_POST["phone"]."<br />";
$MESSAGE_BODY .= "Time: ".$_POST["call_option"]."<br />";
$MESSAGE_BODY .= "Development for: ".$_POST["development_for"]."<br /><br />";
$MESSAGE_BODY .= "Project Details:<br /><br /> ".nl2br($_POST["details"])."<br />";
if ($contents != ''){
mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die ("Failure");
}
else {
echo 'Could Not send RFP ';
}