Location: PHPKode > scripts > phpMysqlSessions > phpmysqlsessions/third.php
	// Need the class definition
	require "_class.session.php";

	// Instantiate a session
	$my_session=new session_class("znet_shop");

	// Remove old session from db (300 sec.)

	// Start session or get previous data

	// All the session data should now be in your variable names
	// $var1, $var2, & $var3 are all assigned now, but we need to
	// get our arrays back.

	// Let's print out these arrays separately to show that it worked.
		echo "array1[$i] == ".$array1[$i]."<br>";
	echo "array2[\"first\"] == ".$array2["first"]."<br>";
	echo "array2[\"second\"] == ".$array2["second"]."<br>";
	echo "array2[\"third\"] == ".$array2["third"]."<br>";
	echo "array2[\"fourth\"] == ".$array2["fourth"]."<br>";

<h1>Session Test</h1>
The following values were in your session database:<br>
Session: <? echo $my_sid?><br>
<table border=3>
 <tr><td>$var1</td><td><? echo $var1 ?></td></tr>
 <tr><td>$var2</td><td><? echo $var2 ?></td></tr>
 <tr><td>$var3</td><td><? echo $var3 ?></td></tr>
 <tr><td>$arr1</td><td><? echo $arr1 ?></td></tr>
 <tr><td>$arr2</td><td><? echo $arr2 ?></td></tr>
Return current item: phpMysqlSessions