Careful! Look at the original code -- he passed "SESSION" to session_register. You definitely do _NOT_ want to session_register $_SESSION!!
$_SESSION replaces $HTTP_SESSION_VARS and should NOT be used when session_register() is used.
The simplest correct rewriting of your script is as follows:
Code:
<?php
session_start();
if (!isset($_SESSION['count']))
{
$_SESSION["count"] = 0;
echo "<li>Counter initialized, "
. "please reload this page to see it increment.";
}
else
{
echo "<li>Waking up session " . session_id();
$_SESSION['count']++;
}
echo "<li>The counter is now $SESSION[count]";
?>
Take care,
Nik
http://www.bigaction.org/