title: HTML and PHP message form
body: <p>I'm currently working on a HTML form that uses PHP to send a message to email. I'm testing in MAMP and am unable to get a response after clicking "send message". Any advice would be much appreciated.</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;form action="mail.php" method="POST"&gt;
      &lt;div class="row half"&gt;
          &lt;div class="6u"&gt;
              &lt;input type="text" class="text" name="name" placeholder="Name" /&gt;
          &lt;/div&gt;
          &lt;div class="6u"&gt;
              &lt;input type="text" class="text" name="email" placeholder="Email" /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row half"&gt;
          &lt;div class="12u"&gt;
              &lt;textarea name="message" placeholder="Message" rows="6" cols="25"&gt;&lt;/textarea&gt;
              &lt;br /&gt;
          &lt;/div&gt;
      &lt;/div&gt;
      &lt;div class="row"&gt;
          &lt;div class="12u"&gt;
              &lt;ul class="actions"&gt;
                  &lt;li class="button form" input type="submit" value="Submit"&gt;Send Message&lt;/li&gt;
              &lt;/ul&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>&lt;?php 
      $name = $_POST['name'];
      $email = $_POST['email'];
      $message = $_POST['message'];
      $formcontent="From: $name \n Message: $message";
      $to = 'my@email.com';
      $subject = "Contact Form";
      $mailheader = "From: $email \r\n";
      $send_message=mail($to, $subject, $formcontent, $mailheader);
  
      if($send_message){
          echo "thank you"
      } else {
          echo "error";
      }
  ?&gt;
  </code></pre>
  
  <p>Thanks</p>