Hello from a php Newbie,
I have a contact form at the bottom of this page:
http://www.keegan-lee.com/Minport/index.html
This is a responsive template which did not include a mail.php file. I would like it to validate and just return back to the form itself with a “Your message has been received…someone will get right back to you”
showing at the top of the form.
I downloaded a responsive CSS3/HTML5 template and I need some help with the contact form coding. This is the php I have to deal with at the moment:
[php]<?php
//vars
$subject = $_POST[‘subject’];
$to = explode(’,’, $_POST[‘to’] );
$from = $_POST[‘email’];
//data
$msg = “NAME: " .$_POST[‘name’] .”
\n";
$msg .= “EMAIL: " .$_POST[‘email’] .”
\n";
$msg .= “SUBJECT: " .$_POST[‘subject’] .”
\n";
$msg .= “COMMENTS: " .$_POST[‘comments’] .”
\n";
//Headers
$headers = “MIME-Version: 1.0\r\n”;
$headers .= “Content-type: text/html; charset=UTF-8\r\n”;
$headers .= “From: <”.$from. “>” ;
//send for each mail
foreach($to as $mail){
mail($mail, $subject, $msg, $headers);
}
?>[/php]
I would need all form submissions returned to my email and a “thank you” message to appear above the form after submit.
Thank you very much for your assistance…KL