title: HTML Form/PHP and MySQL email notification
body: <p>complete beginner at PHP and was wanting a little direction for a website I am creating. I want the admin of the website to receive an email with all of the form information aswell as it being stored in the database. The database is storing the information fine, just need an email notification. How is this achieved. My PHP code is:</p>
  
  <pre><code>&lt;?php
  session_start();
  include('connection.php');
  $product = $_POST['product'];
  $productcomments = $_POST['productcomments'];
  $name = $_POST['name'];
  $address = $_POST['address'];
  $age = $_POST['age'];
  $delivery = $_POST['delivery'];
  mysql_query("INSERT INTO orderform(product, productcomments, name, address, age, delivery)VALUES('$product', '$productcomments', '$name','$address', '$age', '$delivery')");
  header("location: google.com");
  
  $to      = 'j_bussey@live.co.uk';
  $subject = 'Order';
  $message = 'Product: ' . $product . '&lt;br /&gt; Product Comments: ' . $productcomments . '&lt;br /&gt; ';
  $headers = 'From: webmaster@example.com' . "\r\n" .
      'Reply-To: webmaster@example.com' . "\r\n" .
      'X-Mailer: PHP/' . phpversion();
  
  mail($to, $subject, $message, $headers);
  mysql_close($con);
  ?&gt;
  </code></pre>