title: php insert into not adding data to database, any ideas?
body: <p>I'm new to php and am making a simple login system. 
  When someone wants to register, they go to register.html, then insert.php. 
  The code below should add the data from the form to the table but is doesn't come up in it. 
  I suspect it is probably the line:   $sql=INSERT INTO...
  The only thing appearing is the echo statement at the bottom of the code
  I know there probably is a simple answer to this, but I still can't find it. 
  Thanks, any help is really appreciated!</p>
  
  <p>The code for insert.php</p>
  
  <pre><code>&lt;?php
  $email=$_POST['email'];
  $name=$_POST['name'];
  $password=$_POST['password'];
  $con = mysql_connect("localhost","user","p@ssword");
  mysql_select_db("database", $con);
  $sql="INSERT INTO table_name (email, name, password)
  VALUES ('$email', '$name', '$password')";  
  echo"Thank you, you are now registered and can login on our homepage";
  mysql_close($con);
  ?&gt;
  </code></pre>
  
  <p>Thanks again!</p>