Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?PHP
- $to = "YOUREMAIL@GOESHERE.COM";
- $subject = "Contact Page";
- $headers = "From: Contact Page";
- $forward = 0;
- $location = "";
- $date = date ("l, F jS, Y");
- $time = date ("h:i A");
- $msg = "Below is the result of your feedback form. It was submitted on $date at $time.\n\n";
- if ($_SERVER['REQUEST_METHOD'] == "POST") {
- foreach ($_POST as $key => $value) {
- $msg .= ucfirst ($key) ." : ". $value . "\n";
- }
- }
- else {
- foreach ($_GET as $key => $value) {
- $msg .= ucfirst ($key) ." : ". $value . "\n";
- }
- }
- mail($to, $subject, $msg, $headers);
- if ($forward == 1) {
- header ("Location:$location");
- }
- else {
- include("index.html");
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement