title: Best practice for using a mysqli object?
body: <p>I am finally getting around to converting from procedural PHP to OO PHP, and from mysql_XXX to mysqli. I have a quick question about mysqli and OOPHP. Say I create a new mysqli object, and want to use that object on different pages to access the database. Is the best practice to put the created object into a session variable</p>
  
  <pre><code>$_SESSION['dbSession'] = new mysqli('host','user','pass','database');
  </code></pre>
  
  <p>that I can pass around, or is there some other [real] best practice that I should follow?</p>