title: Inserting data MySQL
body: <p>I am a beginner in MySQL and I'm trying to enter some values in my database. The database is already made and its based localy.</p>
  
  <p>I have a Schema named 'test' and within the schema I have a table named 'contacts'. Within the contacts I have an id, first and last name.</p>
  
  <p>So I am trying to enter some data in the contacts. This is my php file:</p>
  
  <pre><code>&lt;?
  $db_host        = 'localhost';
  $db_user        = 'root';
  $db_pass        = '*******'; // root pass
  $db_database    = 'contacts'; 
  
  $link = @mysql_connect($db_host,$db_user,$db_pass);
  mysql_select_db($db_database,$link);
  
  $query = "INSERT INTO contacts VALUES ('','John','Smith')";
  
  mysql_query($query);
  mysql_close();
  ?&gt;
  </code></pre>
  
  <p>When I run the file on my browser, my database doesnt get any values. <strong>How can I execute that file so that John Smith gets added to my database?</strong></p>