PHP Form issues

Hello All,

The bellow code was working for me then suddenly stopped working today! Could some one please look this over and let me know what is wrong with it please… Thank You

$ToEmail = ‘[email protected]’;
$EmailSubject = ‘Training Request’;
$mailheader = “From: “.$_POST[“email”].”\r\n”;
$mailheader .= “Reply-To: “.$_POST[“email”].”\r\n”;
$mailheader .= “Content-type: text/html; charset=iso-8859-1\r\n”;
$MESSAGE_BODY = “Name: “.$_POST[“name”].”
”;
$MESSAGE_BODY .= “Email: “.$_POST[“email”].”
”;
$MESSAGE_BODY .= “Phone: “.$_POST[“phone”].”
”;
$MESSAGE_BODY .= “Company Name: “.$_POST[“company_name”].”
”;
$MESSAGE_BODY .= “Company Address: “.$_POST[“company_address”].”
”;
$MESSAGE_BODY .= “Address 2: “.$_POST[“address2”].”
”;
$MESSAGE_BODY .= “Email: “.$_POST[“email”].”
”;
$MESSAGE_BODY .= “City: “.$_POST[“city”].”
”;
$MESSAGE_BODY .= “State: “.$_POST[“state”].”
”;
$MESSAGE_BODY .= “Zip Code: “.$_POST[“zip_code”].”
”;
$MESSAGE_BODY .= “Email: “.$_POST[“email”].”
”;
$MESSAGE_BODY .= “Onsite Training Type: “.$_POST[“training_type”].”
”;
$MESSAGE_BODY .= “Comment: “.nl2br($_POST[“comment”]).””;

mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die (“Failure”);
echo :“Mail Sent”

right at the end change
[php]
echo :“Mail Sent”;
[/php]

to…
[php]
echo “Mail Sent”;
[/php]

Honestly you should have it set like this…
[php]
var mailSent = mail($ToEmail, $EmailSubject, $MESSAGE_BODY, $mailheader) or die (“Failure”);

if(mailSent){
echo “Mail Sent”;
}
else {
echo “Something went wrong”;
}
[/php]

See if that changes anything

Sponsor our Newsletter | Privacy Policy | Terms of Service