title: AMP Form to work with PhP
body: <p>I am trying to setup a page with a contact form using AMP:</p>
  
  <p>The form has only 4 fields:</p>
  
  <ul>
  <li>Name</li>
  <li>Email:</li>
  <li>How can we help?</li>
  <li>Phone Number:</li>
  </ul>
  
  <p>Then I want that info to be sent to my email address - this is what I have in the HTML</p>
  
  <pre><code>    &lt;h4&gt;How can we help?&lt;/h4&gt;
  &lt;form class="p3 hide-inputs"
    method="post"
    action-xhr="/ampmail.php"
    target="_top"&gt;
    &lt;div class="ampstart-input inline-block relative mb3"&gt;
      &lt;input type="text"
        name="name"
        placeholder="Name..."
        required&gt;
    &lt;/div&gt;
     &lt;div class="ampstart-input inline-block relative mb3"&gt;
      &lt;input type="email"
        name="email"
        placeholder="Email..."&gt;
    &lt;/div&gt;
       &lt;div class="ampstart-input inline-block relative mb3"&gt;
      &lt;input type="text-area"
        name="enquiry"
        placeholder="How can we help?"&gt;
    &lt;/div&gt;
    &lt;div class="ampstart-input inline-block relative mb3"&gt;
      &lt;input type="tel"
        name="my_tel"
        placeholder="Contact Number"&gt;
    &lt;/div&gt;
    &lt;input type="submit"
      value="Contact Me"
      class="ampstart-btn caps"&gt;
        &lt;div submit-success&gt;
      &lt;template type="amp-mustache"&gt;
        Success! Thanks {{name}}. Our design specialists will contact you shortly.
      &lt;/template&gt;
    &lt;/div&gt;
    &lt;div submit-error&gt;
      &lt;template type="amp-mustache"&gt;
        Error! Thanks {{name}} for trying the
        &lt;code&gt;amp-form&lt;/code&gt; demo with an error response.
      &lt;/template&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Then in my ampmail.php, I have the following:</p>
  
  <pre><code>&lt;?php
  $name = $_POST['name'];
  $email = $_POST['email'];
  $phone = $_POST['my_tel'];
  $formcontent=" From: $name \n Phone: $my_tel";
  $recipient = "admin@example.com";
  $subject = "Contact Form";
  $mailheader = "From: $email \r\n";
  mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
  echo "Thank You!";
  ?&gt;
  </code></pre>
  
  <p>But it seems the two are not communicating.</p>