title: PHP Insert Command not working
body: <p>Hi guys can you please tell me if there is an error on this code. this is not working. it didn't add any on my database. thanks you!    </p>
  
  <p>
  
  <pre><code>$con = mysql_connect("localhost","root","pass");
  if (!$con){
  die("Can not connect: " . mysql_error());
  }
  mysql_select_db("mytable",$con);
  
  
  
  if(isset($_POST['add'])){
  
  // Variables
  
  $acc_class = $_POST['acc_class'];
  
  $AddQuery = "INSERT INTO mytable ('acc_class') VALUES ('$acc_class')";  
  
  mysql_query($AddQuery, $con);
  
  echo "Record Successfully Added!!";
  };
  
  
  mysql_close($con);
  
  ?&gt;
  &lt;form action="add.php" method="post"&gt;
  
  Account Classification:
  &lt;input  required="required" placeholder="e.g Hotel, Restaurant" type="text" name='acc_class' size=15 /&gt;
  
  &lt;input type="submit" name='add' Value='&amp;nbsp;Add Record&amp;nbsp;'/&gt;
  &lt;/form&gt;
  </code></pre>