title: PHP for member sign up issues on submit
body: <p>I've been putting together my first attempt at anything PHP...and it doesnt work...
  Basically when I click 'Submit' it just changed the window to display the php code, and submits nothing to mysql.</p>
  
  <p>This is what I have.</p>
  
  <pre><code>&lt;?php
  require('config.php');
  
  if(isset($_POST['submit'])){
  
  //Perform the verification
  
  $email1 = $_POST['email1'];
  $email2 = $_POST['email2'];
  $pass1 = $_POST['pass1'];
  $pass2 = $_POST['pass2'];
  
  if($email1 == $email2){
  if($pass1 == $pass2){
  //all good carry on
  
  $name = mysql_escape_string($_POST['name']);
  $lname = mysql_escape_string($_POST['lname']);
  $uname = mysql_escape_string($_POST['uname']);
  $email1 = mysql_escape_string($email1);
  $email2 = mysql_escape_string($email2);
  $pass1 = mysql_escape_string($pass1);
  $pass2 = mysql_escape_string($pass2);
  
  
  
  mysql_query("INSERT INTO `users` (`id`, `name`, `lname`, `uname`, `email`, `pass`) VALUES (NULL, '$name', '$lname', '$uname', '$email1', '$pass1')");
  
  
  
  
  }else{
  echo "Sorry, your passwords do not match.&lt;br /&gt;";
  exit();
  }
  }else{
  echo "Sorry, your email addresses do not match.&lt;br /&gt;&lt;br /&gt;";
  
  
  }else{
  
  $form = &lt;&lt;&lt;EOT
  &lt;form action="register.php" method="POST"&gt;
  First Name: &lt;input type="text" name="name" /&gt;&lt;br /&gt;
  Last Name: &lt;input type="text" name="lname" /&gt;&lt;br /&gt;
  Username: &lt;input type="text" name="uname" /&gt;&lt;br /&gt;
  Email: &lt;input type="text" name="email1" /&gt;&lt;br /&gt;
  Confirm Email: &lt;input type="text" name="email2" /&gt;&lt;br /&gt;
  Password: &lt;input type="text" name="pass1" /&gt;&lt;br /&gt;
  Confirm Password: &lt;input type="text" name="pass2" /&gt;&lt;br /&gt;
  &lt;input type="submit" value="Register" name="submit" /&gt;
  
  &lt;/form&gt;
  
  
  EOT;
  
  }
  
  ?&gt;
  </code></pre>
  
  <p>I'll add that the only way I could see the form was to copy the 'form' into a separate html file.</p>
  
  <p>Any help wold be great and if you need more info just let me know.</p>
  
  <p>Thanks</p>