All-In-One Feedback Form
$form_block = "
";
if ($_POST[op] != "ds") {
echo "$form_block";
} else if ($_POST[op] == "ds") {
if ($_POST[sender_name] == "") {
$name_err = "Please enter your name!
";
$send = "no";
}
if ($_POST[sender_email] == "") {
$email_err = "Please enter your
e-mail address!
";
$send = "no";
}
if ($_POST[message]== "") {
$message_err = "Please enter a message!
";
$send = "no";
}
if ($send != "no") {
$msg = "E-MAIL SENT FROM rntsoft.com\n";
$msg .= "Sender's Name: $_POST[sender_name]\n";
$msg .= "Sender's E-Mail: $_POST[sender_email]\n";
$msg .= "Message: $_POST[message]\n\n";
$to = "you@yourdomain.com";
$subject = "All-in-One Web Site Feedback";
$mailheaders = "From: My Web Site
\n";
$mailheaders .= "Reply-To: $_POST[sender_email]\n";
mail($to, $subject, $msg, $mailheaders);
echo "Mail has been sent!
";
} else if ($send == "no") {
echo "$name_err";
echo "$email_err";
echo "$message_err";
echo "$form_block";
}
}
?>