title: Multiple Prepared statements in PHP with MySQLi
body: <p>I want to do two prepared statements, one right after the other in PHP with MySQLi. I am a novice at PHP and MySQLi so I don't know whether I should close the statement, close the database connection, put all of the code in a function, or just have code not inside a function. </p>
  
  <p>Basically I just want to insert a record into one table and then insert the same record into another table using MySQLi.</p>
  
  <p>Thanks!</p>