"; $sendTo = "feedback@yourdomain.com"; $subjectLine = "Feedback Submission"; $thanksUrl = "thanks.html"; //confirmation page // Build message body from web form input foreach ($_POST as $field=>$value) $body .= "$field: $value\n"; $body .= "\n" . @gethostbyaddr($_SERVER["REMOTE_ADDR"]); $body = htmlspecialchars($body, ENT_NOQUOTES); //make safe // Send email and direct browser to confirmation page mail($sendTo, $subjectLine, $body, "From: $sendFrom"); header("Location: $thanksUrl"); ?>