title: Troubleshoot MySQL query
body: <p>I need help with this code, it doesent insert the values to my database.
  Probably a simple problem but it's late here in Sweden so I would appriciate if someone could have a look at this and tell me what's wrong:</p>
  
  <pre><code>    include "../../inc/mysql_config.php";
  $to = mysql_real_escape_string($_POST['to']);
  $message = mysql_real_escape_string($_POST['message']);
  
  mysql_query("INSERT INTO messages (to, message) VALUES ('".$to."', '".$message."')");
  </code></pre>
  
  <p>Every variable have an value, double checked that and the mysql_config.php is working.</p>
  
  <p>MySQL error code:</p>
  
  <blockquote>
    <p>You have an error in your SQL syntax;
    check the manual that corresponds to
    your MySQL server version for the
    right syntax to use near 'to, message)
    VALUES ('hubb', 'asd')' at line 1</p>
  </blockquote>