Location: PHPKode > scripts > Session class > session-class/index.php
<?php
session_start();
error_reporting(E_ALL);

// including everything
include 'libs/sess.php';

// loading
$sess = &library_session::start();

// check if we done that
if ($sess->initialised == FALSE)
$sess->initialize();

// Setting a var with it's value.. 
$sess->set('userName', 'John Doe'); 

// getting it again and showing it.
echo $sess->get('username'); 

// clear everything
$sess->drop(); 
?>
Return current item: Session class