title: Error in SQL syntax when I try a query
body: <p>i've a big (and stupid) problem with a simple sql insert to query (mysqli), i've already used this format without errors, but now didn't work..</p>
  
  <p>please help me find the problem..</p>
  
  <pre><code>//Get admin form details
  $a_user = $_POST["a_user"];
  $a_pass = $_POST["a_pass"];
  $a_pin = $_POST["a_pin"];
  
  if($a_user == "$admin_username" &amp;&amp; $a_pass == "$admin_password" &amp;&amp; $a_pin == "$admin_pin"):
      $keygen = md5(microtime().rand());
      $mysqli-&gt;query("INSERT INTO keys (keygen) VALUES ('$keygen')") or die(mysqli_error($mysqli));
      $mysqli-&gt;close;
  else:
      header("Location: ?page=admin&amp;error=1");
  endif;
  </code></pre>
  
  <p>Here is the error:</p>
  
  <blockquote>
    <p>Error: 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 'keys (keygen) VALUES ('85faa7f618e433819d7e5ca57076377c')' at line 1</p>
  </blockquote>