check($_POST['imagetext']);
if(!$valid) {
$error = 1;
$errstr[] = "The code you entered was incorrect";
}
}
if ($error == 1) {
echo "
\n\n";
foreach($errstr as $err) {
echo " " . $err . "\n";
}
echo "\n\n
\n\n";
showForm();
} else {
@mail($to, "Site Contact - " . $_POST['subject'],
"Drew,\nOn " . date("r") . ", " . $_POST['name'] . " " . $_POST['email'] .
" sent the following message.\nReason " .
$_POST['reason'] . "\n\n" . stripslashes($_POST['message']), "From: " . $_POST['email']);
echo "\nThanks for contacting me. I'll try to get back to you as soon as I can. Thanks for
visiting my website. If I don't get back to you within one week, please fill out the form again.
"
."Click here to close this window.";
}
} //else submitted
function showForm()
{
$_POST['message'] = @htmlspecialchars(@$_POST['message']);
echo <<
EOD;
}
?>