Location: PHPKode > scripts > mSess PHP Class > msess-php-class/page3.php
<html>
<body>
<?php
 //Load Custom Session Library
 require ("mSess.inc");
 $GLOBALS['mSess'] = new mSess ("localhost", "username", "password", "database", "sessionVals");
 $GLOBALS['mSess']->open ();

 //Destroy the current session
 $GLOBALS['mSess']->destroy ();
 ?>
<p>Below is a dump of the all the session variables after destroying the session:</p>
<pre>
<?php
 echo (var_export ($GLOBALS['sessionVals'], true));
 ?>
</pre>
<p><a href="page1.php?<?php echo ($GLOBALS['mSess']->getSID ()); ?>">Click here to go to page 1, and try again</a></p>
<?php
 //Close Custom Session Library
 $GLOBALS['mSess']->close ();
 ?>
<div style="border: 1px solid #C0C0C0;">
<h4>Errors:</h4>
<pre>
<?php
 //Display Errors
 echo (implode ("\n", $GLOBALS['mSess']->getErrs ()));
 ?>
</pre>
</div>
</body>
</html>
Return current item: mSess PHP Class