<?php require_once 'SessionManager.class.php'; //Creating the SessionManager object $sess=SessionManager::getInstance("MySession"); //adding a variable to the session $sess->myvar="test";
//get the var $sess->myvar;
//check if the var is set if(isset($sess->myvar)) echo "yatta";
//regen an ID with deleting the old one $sess->regenerateID(true);
//delete the session and the session cookie. $sess->destroy();
//Imagine that's an another page just do $sess=SessionManager::getInstance(); //to get the SessionManager, with all the config. ?>
|