Here is a very basic class for Session handling. // Example Usage: include('classes/session.php'); $Session = new Session('Script'); // Clean setting of the session data $Session->Set('user','username'); $Session->Set('pass','password'); // Clean retrieving of the data $User = $Session->Get('user'); // Clean retrieving of the data, with a default value. $User = $Session->Get('user','username'); // If no value, returns 'username' PHP: session.php <?PHP /* Code developed by Thomas Andrews (thomas.p.andrews@gmail.com) Code is free to use. */ session_start(); class Session { var $SessionName='Default'; /* Function name: Constructor Params: @SessionName - The session name */ function __constructor($SessionName) { $this->SessionName=$SessionName; } /* Function name: Set Params: @Setting - The key to set @Value - The value to set */ function Set($Setting,$Value) { $_SESSION[$this->SessionName][$Setting]=$Value; } /* Function name: Get Params: @Setting - The key to get @Default - Value to return if the requested key is empty. */ function Get($Setting,$Default='') { if(isset($_SESSION[$this->SessionName][$Setting]) && !empty($_SESSION[$this->SessionName][$Setting])) return $_SESSION[$this->SessionName][$Setting]; else return $Default; } } ?> PHP: Any questions, please feel free to ask.