"; $SendTo = "feedback@yourdomain.com"; $SubjectLine = "Feedback Submission"; $thanksUrl = "thanks.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 email and direct browser to confirmation page mail($SendTo, $SubjectLine, $MsgBody, "From: " . $SendFrom); header("Location: $thanksUrl"); ?>