title: contact form php help
body: <p>Ok I have our contact form fully working, and processing correctly. I have two questions ...</p>
  
  <ol>
  <li><p>on the contact form page , I wish to add a checkbox for user to tick to send copy of the email to them aswell.</p></li>
  <li><p>on the process form part I want to redirect to error page if all goes horribly wrong.</p></li>
  </ol>
  
  <p>Currently on my form submit i have action going to thankyou.php</p>
  
  <p>My form process i have added within the thankyou.php page but could pull it out separately if needed.</p>
  
  <p>.......................................</p>
  
  <p>My form process is below ( very very simple )</p>
  
  <pre><code>&lt;?php
  
  $youremail = "someonesemail@email.com";
  
  $yourname    = $_POST['yourname'];
  $email   = $_POST['email'];
  $location = $_POST['location'];
  $textarea = $_POST['textarea'];
  
   $headers = "From: $email";
  
  $content = "Hello there! This is a message from your contact form.\r\n
  \r\n
  \r\n
  Name: $yourname\r\n
  \r\n
  E-mail: $email\r\n
  \r\n
  Location: $location\r\n
  \r\n
  Message: $textarea\r\n\r\n";
  
  $send = mail($youremail, 'Message from your conatct form', $content, $headers);
  
   if($send)
   {
  echo "ok";
   }
  </code></pre>
  
  <p>Im not brill with php so any help appreciated</p>