59-contact-us.txt

go here $first_name = $_POST['first_name']; $last_name = $_POST['last_name']; // --------------------------------------- Build the variables for sending 2 emails (to you & to user) $subject1 = "Form submission"; $subject2 = "Copy of your form submission"; $message1 = $first_name . " " . $last_name . " wrote the following:" . "\n\n" . $_POST['message']; $message2 = "Here is a copy of your message " . $first_name . "\n\n" . $_POST['message']; $headers1 = "From:" . $from; $headers2 = "From:" . $to; // You can also use header('Location: thank_you.php'); to redirect to another page. // ----------------------------------------------- SEND THE EMAILS WITH PHP mail() function mail($to,$subject1,$message1,$headers1); // Sends an email to YOU! mail($from,$subject2,$message2,$headers2); // sends a copy of the message to the sender // if you are careful you can use the 'echo' command to display HTML echo "

Mail Sent. Thank you

" . $first_name . ", we will contact you shortly."; } else { ?>
First Name:
Last Name:
Email:
Message: