title: SQL Syntax Error when running through PHP but runs fine as an SQL Query
body: <p>So, a snippet of my code which is resulting in an error is :    </p>
  
  <pre><code>$con = mysqli_connect('localhost', 'root', '', 'notesDB');
  
  if(isset($_POST['tableName'])) {
      $tName = htmlentities($_POST['tableName']);
  
      $firstQuery = mysqli_query($con,"INSERT into notes(Title) VALUES( '$tName'); CREATE TABLE $tName(id int NOT NULL AUTO_INCREMENT, Title varchar(20) NOT NULL, Description varchar(100), PRIMARY KEY(id));");
  
      if($firstQuery){
          header("Location: create2.php");
      }
      else 
          echo mysqli_error($con);
  }
  </code></pre>
  
  <p>The output of this is :</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 'CREATE TABLE test1(id int NOT NULL AUTO_INCREMENT, Title varchar(20) NOT NULL, D' at line 1
  </code></pre>
  
  <p>Well, the funny thing is that the exact code (except the variable - I just removed the $ sign) executed perfectly in phpMyAdmin.</p>
  
  <p>Also, to prove that there is nothing really wrong with the php, the query executed without any error when it was only the INSERT query (and not the CREATE query).</p>