title: success/error message for insert into mysql database
body: <p>when the info is successfully inserted, it's displaying the error message and saying that it's a duplicate entry for a primary key...I can't figure out why!</p>
  
  <pre><code>&lt;?
  $email=$_POST['email'];
  $pw=$_POST['pw'];
  
  mysql_connect('***','***','***');
  @mysql_select_db('***') or die('Unable to select database');
  
  $query = "INSERT INTO test_table VALUES ('','$email','$pw')";
  mysql_query($query) or die(mysql_error());
  
  if(mysql_query($query))
  {
      echo 'success';
  }
  else
  {
      echo 'failure' .mysql_error();
  }
  
  mysql_close();
  ?&gt;
  </code></pre>