title: Insert Variables into a table which is selected from a PHP variable name
body: <p>So, I want to insert some data into a MySQL table where the table name that the data is being put into is a PHP Variable. </p>
  
  <p>Something like this:</p>
  
  <pre><code>$tablename = "databasetable";
  
  $insert = mysql_query(
  "INSERT INTO '".$tablename."' (column1, col2) 
  VALUES ('Blah', 'Blah')
  ");
  </code></pre>
  
  <p>But that of course doesn't work, so I'm not sure what to do.
  By the way, I'm new to PHP and StackOverflow.</p>