title: PHP MySQL command syntax error
body: <p>This sql query is not working:</p>
  
  <pre><code>$sql = "INSERT INTO top(topic_subject,topic_date, topic_cat, topic_by)
  VALUES(" . mysql_real_escape_string($_POST['topic_subject']) . " , NOW()," . mysql_real_escape_string($_POST['topic_cat']) . " , " . isset ($_SESSION['user_id']) . ")";
  </code></pre>
  
  <p>how can I fix it?. I am getting this error message.</p>
  
  <pre><code>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`
  </code></pre>