Hi all,
can anyone please help me with my session problem? I'm currently using PHP4.2.2 with Apache on Redhat 8.0.
Whenever I try to use session, it doesn't seem to work.. following is the sample code I use and the result printed out is always 1 no matter how many time I refresh..
<?php
session_start();
session_register('count');
$count++;
echo "<p>You've been here $count times. Thanks!</p>";
?>
I use phpinfo() to checked and found out that session is enable.... what have I done wrong?? thank you very much...
Question about Session
Moderators: egami, macek, gesf
I think you're problem is allready described here:
http://www.php-forum.com/p/viewtopic.php?t=318
Greetz Daan
http://www.php-forum.com/p/viewtopic.php?t=318
Greetz Daan
Try this instead
Code: Select all
<?
session_start();
$_SESSION['count']++;
print "<p>You've been here {$_SESSION['count']} times. Thanks!</p>";
?>