For some reason, the options are not showing up in my email. I can get the email to send just fine. I can see the body and all its comments, but none of the entries that the use
Change method="get"
to
method="post"
and remove enctype
. It's not required in this case.
Also, why is there a ?
in your action? You can keep action blank as it is posting to the same page.
To make things even simpler for you, copy paste the below code and run the file again
if(isset($_POST['submit']))
{
$ToEmail = 'dmandrade1978@gmail.com';
$EmailSubject = 'Message from web page!!';
$name = $_POST['name'];
$email = $_POST['email'];
$comment = $_POST['comment'];
$urphone = $_POST['urphone'];
$event = $_POST['event'];
$date = $_POST['date'];
$mail = $_POST['mail'];
$phone = $_POST['phone'];
$comment = $_POST['comment'];
$hearaboutus = $_POST['hearaboutus'];
$body = <<
Name: $name
Comment: $comment
Phone: $urphone
Date: $urdate
Comment: $comment
How did you hear?: $hearaboutus
Mail optiom: $mail
EMAIL;
$header = "Content-type: text/html\r\n";
mail("$ToEmail", "$EmailSubject", "$body", "$header");
echo ("Message Sent!");
}
?>
讨论(0)
- 热议问题