form method="post" action="http://comments.myspace.com/index.cfm?fuseaction=user.ConfirmComment">
$mailto = $_POST['sendto'] ;
$subject = "Ayala Percussion Ensemble Email Message" ;
$formurl = "contact.php" ;
$errorurl = "error.php" ;
$thankyouurl = "index.asp" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($mailto) || empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if ($mailto == "Choose A Contact.") {
header( "Location: $errorurl" );
exit ;
}
if ($subject == "Choose A Subject.") {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from: " . $name .
"\n$http_referrer\n\n" .
"________________________( COMMENTS )________________________\n\n" .
"\nName: " . $name .
"\nE-Mail: " . $email .
"\n\nMessage: \n" . $comments .
"\n____________________________________________________________\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: feedback2.php"
);
header( "Location: $thankyouurl" );
exit ;
?>
|