title: Php contact form errors
body: <p>I'm building a php contact form that checks if some fields are filled it or not (no ajax). 
  The form is not working for 100%. I will try to explain. When I submit my form, The user navigates to <a href="http://mydomain.com/send.php" rel="nofollow">http://mydomain.com/send.php</a> 
  There is receive my error messages (if there are any). When I refresh the send.php page I receive the following errors: <strong>Notice: Undefined index: name in /Library/WebServer/Documents/~aledvertising/send.php</strong></p>
  
  <p>Here is my code</p>
  
  <p><strong>html form</strong></p>
  
  <pre><code>&lt;form method="post" action="send.php"&gt;
      &lt;div id="form-top"&gt;
  
      &lt;/div&gt;
      &lt;div id="form-left"&gt;  
  &lt;label&gt;Naam:&lt;span class="star"&gt;*&lt;/span&gt;&lt;/label&gt;
      &lt;input name="name" placeholder="Uw naam"&gt;
  
  
      &lt;label&gt;Email:&lt;span class="star"&gt;*&lt;/span&gt;&lt;/label&gt;
      &lt;input name="email" type="email" placeholder="Uw email"&gt;
  
      &lt;label&gt;Hoeveel is 2+2? (Anti-spam)&lt;span class="star"&gt;*&lt;/span&gt;&lt;/label&gt;
  &lt;input name="human" placeholder="Uw antwoord"&gt;
  
      &lt;/div&gt;
      &lt;div id="form-right"&gt;
      &lt;label&gt;Uw bericht:&lt;span class="star"&gt;*&lt;/span&gt;&lt;/label&gt;
      &lt;textarea name="message" placeholder="Uw bericht"&gt;&lt;/textarea&gt;
      &lt;/div&gt;
          &lt;input id="submit" name="submit" type="submit" value="Verzenden"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>SEND.PHP</strong></p>
  
  <pre><code>&lt;?php
      $name = $_POST['name'];
      $email = $_POST['email'];
      $message = $_POST['message'];
      $from = 'From: ' . $_POST['email']; 
      $to  = 'myemail@mail.com' . ', '; 
      $to .= $_POST['email'];
      $subject = 'Uw vraag op www.aledvertising.be';
      $human = $_POST['human'];
  
      $body = "From: $name\n E-Mail: $email\nMessage:\n $message";
   ?&gt;
   &lt;?php
  if ($_POST['submit']) {
      if ($name != '' &amp;&amp; $email != '' &amp;&amp; $message != '') {
          if ($human == '4') {                 
              if (mail ($to, $subject, $body, $from)) { 
              echo '&lt;p class="green"&gt;Uw bericht is succesvol verzonden.&lt;/p&gt;';
          } else { 
              echo '&lt;p&gt;Er iets misgelopen, probeer opnieuw aub.&lt;/p&gt;'; 
          } 
      } else if ($_POST['submit'] &amp;&amp; $human != '4') {
          echo '&lt;p&gt;2+2 is niet gelijk aan het getal dat u hebt ingevoerd.&lt;/p&gt;';
      }
      } else {
          echo '&lt;p&gt;Alle velden met een * zijn verplicht in te vullen.&lt;/p&gt;';
      }
  }
      ?&gt;
  </code></pre>
  
  <p>Can somebody please help me to get a full working form? Thank you </p>