title: How to send an email from an HTML5 form
body: <p>I am having issues trying to submit a form and have it email the data submitted. I understand this is usually done but I seem to be having problems figuring out what's wrong here. So the current code is.</p>
  
  <pre><code> &lt;div class="contact" id="contact"&gt;
          &lt;div class="wrap"&gt;
              &lt;h3&gt;CONTACT US&lt;/h3&gt;
              &lt;p class="a"&gt;Free Estimates&lt;/p&gt;
              &lt;div class="form"&gt;
                   &lt;div class="form-text"&gt;
                   &lt;form action="../contact.php"&gt;
                      &lt;input type="text" class="textbox" value="Your Name*" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name';}"&gt;
                      &lt;input type="text" class="textbox" value="Your E-mail*" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'E-mail';}"&gt;
                      &lt;input name="PNumber" type="text" class="Subject" value="Phone Number" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Website';}"&gt;
                  &lt;/div&gt;
                       &lt;textarea placeholder="Your Message*"&gt;&lt;/textarea&gt;
                       &lt;div class="clear"&gt; &lt;/div&gt;
                       &lt;input type="submit" value="SEND MESSAGE"&gt;                  
               &lt;/div&gt;
       &lt;/div&gt;
       &lt;/div&gt;
  </code></pre>
  
  <p>I have a file called mailfrom.php but I think this is where I'm having problems</p>
  
  <pre><code>&lt;?php
  $to      = 'contact@qixty.com';
  $subject = 'New Request from Website';
  $message = $_POST['mytextarea'];
  $headers = 'From: webmaster@qixty.com' . "\r\n" .
  'Reply-To: contact@qixty.com' . "\r\n" .
  'X-Mailer: PHP/' . phpversion();
  
  mail($to, $subject, $message, $headers);
  ?&gt;
  </code></pre>
  
  <p>After I hit submit on the main page, I am brought to a new blank page.</p>
  
  <p>Changes the URL from <code>http://qixty.com</code>
  to
  <code>http://qixty.com/mailfrom.php?PNumber=Phone+Number</code></p>
  
  <p>Any help would be great. 
  I know I could just insert a link to mailto like this</p>
  
  <pre><code>&lt;a href="mailto:contact@qixty.com?cc=faulkerson@gmail.com" class="btn" data-type="submit"&gt;Send&lt;/a&gt;
  </code></pre>
  
  <p>But that doesn't post the form data. I would like to have it send an email to me with the form data in the body of the message.</p>