';
}
if(strlen($comments) < 2) {
$error_message .= 'Wot no comment....
';
}
if(strlen($error_message) > 0) {
died($error_message);
}
$email_message = "Message Contents:
";
function clean_string($string) {
$bad = array("content-type","bcc:","to:","cc:","href");
return str_replace($bad,"",$string);
}
$email_message .= "Name: ".clean_string($name)."\n";
$email_message .= "Email: ".clean_string($email_from)."\n";
$email_message .= "Comments: ".clean_string($comments)."\n";
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);
header( 'Location: /web/contactthanks.html' ) ;
}
?>