session_start();
function add1()
{
$_SESSION['count'] += 1;
}
?>
PHP Test Page
// Use $HTTP_SESSION_VARS with PHP 4.0.6 or less
if (!isset($_SESSION['my_site_session']))
{
$_SESSION['my_site_session'] = TRUE;
$_SESSION['count'] = 0;
}
echo "\n";
echo "PHP Session Count: ";
echo $_SESSION['count'], "\n";
echo "
\n";
?>