<?
/*
CHFEEDBACK.PHP Feedback Form PHP Script Ver 2.01.
$Id: phpscript.txt 1.1 2003/04/17 11:53:45 chris Exp $
*/
// ------------- CONFIGURABLE SECTION ------------------------
$mailto = '[email protected]' ;
$subject = "THE SUBJECT YOU WANT IN YOUR EMAIL" ;
$formurl = "http://yourURL.com/contact.php" ;
$errorurl = "http://YourURL.com/error.php" ;
$thankyouurl = "http://YourURL.com/thankyou.php" ;
// -------------------- END OF CONFIGURABLE SECTION ---------------
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$comments = $_POST['comments'] ;
$http_referrer = getenv( "HTTP_REFERER" );
if (!isset($_POST['email'])) {
header( "Location: $formurl" );
exit ;
}
if (empty($name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
$messageproper =
"This message was sent from:\n" .
"$http_referrer\n" .
"------------------------- COMMENTS -------------------------\n\n" .
$comments .
"\n\n------------------------------------------------------------\n" ;
mail($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: chfeedback.php 2.01" );
header( "Location: $thankyouurl" );
exit ;
?>