Post HTML form also!!!
Hi, I have a problem with my .php Contact Form. When it reaches my email, the name, last name, email is empty.
This is the code:
<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$visitor_email = $_POST['email'];
$message = $_POST['message'];
$email_from = 'myemail@hotmail.com';
$email_subject = "S&P Website";
$email_body = "First Name: $first_name.\n".
"Last Name: $last_name.\n".
"User Email: $visitor_email.\n".
"User Message: $message.\n";
$to = "mysecondemail@hotmail.com";
$headers = "From $email_from \r\n";
$headers .= "Reply-To: $visitor_email \r\n";
mail($to,$email_subject,$email_body,$headers);
header("Location: index.html");
?>
Post your HTMl form or where you make the request