// THIS IS ALL THE PHP YOU NEED TO SEND AN EMAIL
$email = $HTTP_POST_VARS['email'];
$name = $HTTP_POST_VARS['name'];
$fromwhere = $HTTP_POST_VARS['fromwhere'];
$comments = $HTTP_POST_VARS['comments'];
// FIRST CHECK THAT SOME VARIABLE IS DEFINED (TO VERIFY THEY SUBMITTED THE FORM)
if ($email && $name && $comments){
// HOW THE MESSAGE SHOULD BE FORMATTED
// \n == RETURN, \t == TAB
$message = "Sender: $name\n";
$message .= "Email Address: $email\n";
$message .= "From: $fromwhere\n";
$message .= "Comments: $comments\n";
// SEND THE MAIL
mail("dorota@giantchicken.com", "GiantChicken Mailform", "$message", "From: $name <$email>");
// REDIRECT THEM WHERE EVER YOU WANT
header("Location: mailsent.shtml");
}
?>
GiantChicken.com - Send Us Mail
include("../code/header.html"); ?>