I'm having some difficulty getting my contact form working on my website. It opens a blank page and actually doesn't work at all. My code is below:
<form action="mail.php" method="post" class="comment-form">
<input name="name" type="text" placeholder="Your Name" required>
<input name="email" type="email" placeholder="Email">
<input type="url" placeholder="Website">
<textarea rows="4" placeholder="Messages"></textarea>
<input type="submit" value="send message">
</form>
And php code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];
$from = 'From: Website';
$to = 'me@me.com';
$subject = 'Email Inquiry';
$header = "From: noreply@example.com\r\n";
$header.= "MIME-Version: 1.0\r\n";
$header.= "Content-Type: text/html; charset=ISO-8859-1\r\n";
$header.= "X-Priority: 1\r\n";
mail($to, $subject, $message, $headers);
header("location: ../contact");
?>