I cannot see what is wrong with this code. When I receive the email everything comes through ok except for the email address. In my email the email shows as a . no matter what I type or change it too.
Can anyone see why this is happening.
<form class="contact-page col-md-5 col-11" method="post" action="../php/contact-page-handler.php">
<input type="text" name="name" placeholder="full name" required>
<input type="text" name="mail" placeholder="your e-mail" required>
<input type="text" name="subject" placeholder="subject" required>
<textarea name="message" placeholder="enter your message here" rows="5" required></textarea>
<button type="submit" name="submit">Send Message</button>
</form>
<?php
$name = $_POST ['name'];
$vistor_email = $_POST['email'];
$email_subject = $_POST['email_subject'];
$message = $_POST['message'];
$email_from = 'enquires@emergencyplumbers247.com';
$email_subject = "Customer Enquire";
$email_body = "User Name: $name.\n".
"User Email: $vistor_email.\n".
"User Subject: $email_subject.\n".
"User Message: $message.\n";
$to = "emergencyplumbers247uk@gmail.com";
$headers = "From: $email_from \r\n";
$headers .= "Reply-To:$vistor_email \r\n";
mail($to,$email_subject,$email_body,$headers);
header("Location: http://www.emergencyplumbers247.com/confirm.html");
?>