Hi All,
I am using php4. Pls help on session variable.
For the following piece of program, the result is 1 no matter how
many time I reload the page.
<?php
session_start();
session_register('count');
$count++;
echo "<P>You've been here $count times. Thanks!</P>";
?>
It works for the following method, the count increments when I reload the page, but do I really need to unregister then register the variable again in order to update a session variable?
<?php
session_start();
$count=$HTTP_SESSION_VARS['count'];
session_unregister('count');
session_register('count');
$count++;
echo "<P>You've been here $count times. Thanks!</P>";
?>