title: PHP form loads blank page and nothing happens?
body: <p>I've tried out a few PHP contact form tutorials but none seem to work for me. I'm not sure what I'm doing wrong. I tested it in localhost and nothing, so I went ahead and hosted it to see if that would work but still nothing. </p>
  
  <p>HTML</p>
  
  <pre><code>&lt;form class="form" action="form_process.php" method="post" name="contact_form"&gt;
    &lt;p class="name"&gt;
      &lt;label for="name"&gt;Name&lt;/label&gt;&lt;br&gt;
      &lt;input type="text" name="name_first" id="name" placeholder="First" /&gt;
      &lt;input type="text" name="name_second" id="name" placeholder="Last"  /&gt;
  
    &lt;/p&gt;
  
    &lt;p class="email"&gt;
      &lt;label for="email"&gt;Email&lt;/label&gt;&lt;br&gt;
      &lt;input type="text" name="email" id="email" placeholder="mail@example.com" /&gt;
    &lt;/p&gt;
  
    &lt;p class="text"&gt;
      &lt;label for="email"&gt;Comments&lt;/label&gt;&lt;br&gt;
      &lt;textarea name="text" placeholder="Write something to us" /&gt;&lt;/textarea&gt;
    &lt;/p&gt;
  
    &lt;p class="submit"&gt;
      &lt;input type="submit" value="Send" /&gt;
    &lt;/p&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>form_process.php</p>
  
  <pre><code>&lt;?php
      $name_first = $_POST['name_first'];
      $name_second = $_POST['name_second'];
      $email = $_POST['email'];
      $text = $_POST['text'];
      $from = 'From: '; 
      $to = 'EMAIL HERE'; 
      $subject = 'Hello';
  
      $body = "From: $name_first\n $name_second\n E-Mail: $email\n Message:\n $text";
  
      if ($_POST['submit']) {
          if (mail ($to, $subject, $body, $from)) { 
              header("Location: index.html");
              echo '&lt;p&gt;Your message has been sent!&lt;/p&gt;';
              exit;
          } else { 
              echo '&lt;p&gt;Something went wrong, go back and try again!&lt;/p&gt;'; 
          }
      }
  
  ?&gt;
  </code></pre>