I have made a contact form and when clicking submit with the form fully filled out the screen just goes white, The link on the page changes from contact.html to contactform.php.
<?php
if (isset($_POST['submit'])) {
$name = $_POST['name'];
$subject = $_POST['subject'];
$mailFrom = $_POST['mail'];
$message = $_POST['message'];
$mailTo = "email@outlook.com";
$headers = "From: ".$mailFrom;
$txt = "You have received an email from ".$name.".\n\n".$message;
mail($mailTo, $subject, $txt, $headers);
header("Location: index.php?mailsend");
}
?>
<div>
<img src="images/contact.jpg" alt="" class="background-contact">
<div class="contact-box">
<br>
<p class="contact-text-tp">Email</p>
<form class="contact-form" action="contactform.php" method="post">
<br>
<input type="text" name="name" placeholder="Full name">
<br>
<input type="text" name="mail" placeholder="Your email">
<br>
<input type="text" name="subject" placeholder="Subject">
<br>
<textarea name="message" placeholder="Message"></textarea>
<br>
<button type="submit" name="Submit">Send email</button>
</form>
<br>
<p class="contact-text-btm">If you would like to directly email please use; <br> email@outlook.com</p>
</div>
</div>