View Single Post
Old 04-04-2005, 04:28 PM  
pstation
Confirmed User
 
Join Date: Jul 2003
Location: chicago
Posts: 1,135
PHP Code:
<?

// Configuration Settings
$SendTo = "[email protected]";
$SubjectLine = "subject";
$ThanksURL = "thankyou.html"; //confirmation page
$Divider = "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";

// Build Message Body from Web Form Input
$MsgBody = @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n$Divider\n";
foreach ($_POST as $Field=>$Value)
$MsgBody .= "$Field: $Value\n";
$MsgBody .= "$Divider\n" . $_SERVER["HTTP_USER_AGENT"] . "\n";
$MsgBody = htmlspecialchars($MsgBody); //make content safe

// Send E-Mail and Direct Browser to Confirmation Page
mail($SendTo, $SubjectLine, $MsgBody, $emailaddress ,"From: $http_referrer\n");
header("Location: $ThanksURL");
?>
pstation is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote