 <p>Try to use ob_start() at the start of script, and exit(); after header("Location: contact.php");</p> <p>smth like this ...</p> <pre><code>&lt;?php ob_start(); $name = $_POST['name']; $email = $_POST['email']; $message = $_POST['message']; &amp;contact = $_POST['contact']; $formcontent="From: $name \n Message: $message"; $recipient = "info@whatever.co.za"; $subject = "Contact form message"; $mailheader = "From: $email \r\n"; mail($recipient, $subject, $formcontent, $mailheader) or die("Error!"); header("Location: contact.php"); exit(); ?&gt; </code></pre>