title: using insert and create query simultaneously in php
body: <pre><code>    &lt;?php
  
  $uname = $_POST['uservalue'];
  
  $tblname="student".$uname;
  
  $sql = "CREATE TABLE '$tblname' (col1 INT NOT NULL AUTO_INCREMENT PRIMARY KEY, col2 VARCHAR(100) NOT NULL,  col3 TEXT NOT NULL, col4 TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP) ENGINE = MyISAM";
  mysql_query($sql);
  
  
  mysql_query("INSERT INTO table2 (col1, col2, col3) VALUES ('value1', 'value2', 'value3')");
  
  
  
  ?&gt;
  </code></pre>
  
  <p>I want to create a table where table table name is accepted from user using a form and also insert some values in another table at the same time.
  I have tried above php script to do so. The insert query is working properly but dont know whats wrong with create table query, the table is not created in database.
  Any help will be appreciated. Thanks in advance.</p>