I am trying to get user's input on a form, send the form information to myself in an email, and then send the user and email to their inputted email address. This is the code I have, not sure what I'm doing wrong??!?!?
PHP Code:
<?php
$message = "Here is a Sign Change " . "\n\n";
$message = $message . "Submission Date and Time: " . date("l dS of F Y h:i:s A") . "\n";
$message = $message . "Customer Name: " . $_REQUEST['CustName'] . "\n";
$message = $message . "Contact Name: " . $_REQUEST['ContactName'] . "\n";
$message = $message . "Phone Number: " . $_REQUEST['Phone'] . "\n" . "\n";
$message = $message . "Email Address: " . $_REQUEST['EmailAddress'] . "\n" . "\n";
$message = $message . "Requested Change Date: " . $_REQUEST['ChangeDate'] . "\n" . "\n";
$message = $message . "Additional Comments: " . $_REQUEST['Comments'] . "\n" . "\n";
$message = $message . $_REQUEST['EmailSubmission'];
// In case any of our lines are larger than 70 characters, we should use wordwrap()
$message = wordwrap($message, 70);
// Send to impact signs and insert headers and subject
$email = "joewiebe******.com";
$subject = "Here is a sign change email!";
$header = "From: WebEmail\r\n"
// Compile info and send to submitter
mail($email,$subject,$message,$header);
$message = "Thank you for submitting a form";
$email = $_POST["EmailAddress"]
$subject = "Thank you for your submission";
$header = "From: impact_signs@mts.net\n"
// Compile info and send to submitter
mail($email,$subject,$message,$header);
// redirect back to url visitor came from
header('location:home.php');
?>
Comment