title: PHP Contact Form returning error upon submission
body: <p>So I've tried publishing a page with PHP contact form on 2 different servers and I can't get either of them to work perfectly.</p>
  
  <p>Server 1:<br>
  Returns a <code>500 internal error</code> page upon submission.<br>
  I contacted web support and they replied saying I have a:</p>
  
  <blockquote>
    <p>malformed header from script 'index.php': Bad header:</p>
  </blockquote>
  
  <p>My code for index.php as follows:</p>
  
  <pre><code>    &lt;?php
   if(isset($_POST['submit']))
   {
      $name = $_POST['name'];
      $email = $_POST['email'];
      $query = $_POST['message'];
      $email_from = $name.'&lt;'.$email.'&gt;';
  
   $to="testemail@email.com";
   $subject="test subject";
   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
   $headers .= "From: ".$email_from."\r\n";
   $message="   
  
           Name:
           $name     
           &lt;br&gt;
           Email:
           $email        
           &lt;br&gt;
           Message:
           $query        
  
     ";
      if(mail($to,$subject,$message,$headers))
          header("Location:../contact.php?msg=Successful Submission!&lt;br /&gt;
   Thank you for contacting us.");
      else
          header("Location:../contact.php?msg=Error To send Email !");
   }
  ?&gt;
  </code></pre>
  
  <p>Server 2:<br>
  Links me to my "Thank you page" correctly, but it's showing 
  "Error To send Email !" instead of 
  "Successful Submission!" </p>
  
  <p>Any help or advice will be greatly appreciated!</p>