<?
 
 
    include_once 'DB_Session.php';
 
 
    // Setting the values up
 
    $dsn = 'mysql://root:@dragon/test';
 
    $session_table = 'session_table';
 
    $persistent = true;
 
 
    // Creating the session
 
    $sess = new DB_Session($dsn, $session_table, $persistent);
 
 
    // Making anything you like with it
 
    if (!isset($_SESSION['foo'])) {
 
        $_SESSION['foo'] = 1;
 
        session_register('foo');
 
    } else for ($i = 0; $i < 100000; $i++) {
 
        $_SESSION['foo']++;
 
    }
 
 
    // Showing the result
 
    echo "<br>\$_SESSION['foo']: " . $_SESSION['foo'];
 
 
?>
 
<br>
 
<a href="sample.php">Press here</a>
 
 |