"; $SendTo = "feedback@yourdomain.com"; $SubjectLine = "Feedback Submission"; $thanksUrl = "thanks.html"; //confirmation page // Build Message Body from Web Form Input foreach ($_POST as $Field=>$Value) $MsgBody .= "$Field: $Value\n"; $MsgBody .= "\n" . @gethostbyaddr($_SERVER["REMOTE_ADDR"]) . "\n" . $_SERVER["HTTP_USER_AGENT"]; $MsgBody = htmlspecialchars($MsgBody, ENT_NOQUOTES); //make content safe // Send email and direct browser to confirmation page mail($SendTo, $SubjectLine, $MsgBody, "From: $SendFrom"); header("Location: $thanksUrl"); ?>