While the database may be more secure for sessions, you should focus on what you store in the session first - in fact, it should not contain anything other than an identifier to identify the user (and MAYBE is the name or temporary variable between pages).
I would suggest just using default cookies. Database sessions give an extra hit ON EACH PAGE, and although not every site is a slashdot, there is no harm in pre-optimizing something as simple as that.
For use, I would recommend a standard global variable:
$_SESSION['yourvar'] = 'somevalue';
If you use this method in all of your code, you can easily change the source code later using session_set_save_handler , which provides a single way to implement session backends. Note that you can use an object to contain all session processing, just give arrays for each entry array ("Staticclass", "staticmethod").
For deeper use, I would recommend that you take a look at how sessions are handled in KohanaPHP .
source share