title: Inserting Data into MySQL Table via PHP
body: <p>I'm trying to add some simple user data into a database via a webpage written in PHP, but the following code (more specifically, line three) breaks the page. Am I using the wrong MySQL function? I'm pretty sure my query is formatted correctly.</p>
  
  <pre><code>mysql_query("CREATE TABLE stats ( userAgent CHAR(20) )");
  
  $userAgent = $_SERVER["HTTP_USER_AGENT"];
  mysql_query("INSERT INTO stats VALUES ("$userAgent"));
  </code></pre>