title: INSERT INTO wont work!
body: <p>im having some problem with this code:</p>
  
  <pre><code>if (count($_POST)) {
  
  $username = mysql_real_escape_string($_POST['username']);
  $passwd = mysql_real_escape_string($_POST['passwd']);
  
  mysql_query("INSERT INTO users (username, password)
               VALUES ($username, $passwd)");
  
  }
  
  &lt;form method="post"&gt;
  
  &lt;p&gt;&lt;input type="text" name="username" /&gt;&lt;/p&gt;
  &lt;p&gt;&lt;input type="password" name="passwd" /&gt;&lt;/p&gt;
  
  &lt;p&gt;&lt;input type="submit" value="Register me!" /&gt;&lt;/p&gt;
  
  &lt;/form&gt;
  </code></pre>
  
  <p>i am connected to db<br>
  the users column ID is auto_increment</p>
  
  <p>I get this when adding or die mysql_error in sql statement: 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 ' )' at line 2</p>