title: MySQL:  "You have an error in your SQL syntax... near 'desc) VALUES ('Idea','Description')'"
body: <p>I am trying to get MySQL to work for my form submissions.  I am having a problem when I try to insert into a table.<br>
  When I put information into my form and click submit (in this example the information is "Idea" in one field and "Description" in the other) I get this response:</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 'desc) VALUES
    ('Idea','Description')' at line 1"</p>
  </blockquote>
  
  <p>I am running a .php file from a webserver to execute this script.</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>&lt;?php
  
  mysql_connect("localhost","root","") or die(mysql_error());
  mysql_select_db("date_ideas") or die(mysql_error());
  $title=$_POST['title'];
  $title=mysql_real_escape_string($title);
  $desc=$_POST['desc'];
  $desc=mysql_real_escape_string($desc);
  $submit="INSERT INTO ideas (title, desc) VALUES ('$title','$desc');";
  
  mysql_query($submit) or die(mysql_error());
  
  echo ("Idea submitted.  Click &lt;a href='Webroot/submit.php'&gt;here&lt;/a&gt; to go back and post another idea.");
  ?&gt;
  </code></pre>
  
  <p>If you call an echo of the variables used it succeeds at passing through the information, so that's not the problem.</p>