session management

From: Date: Wed, 23 Oct 2002 01:49:33 +0000
Subject: session management
Groups: php.general 
Request: Send a blank email to php-general+get-121016@lists.php.net to get a copy of this message
Hello all, I'm just trying to write a simple script to display the number of times you visit the page during a session. The code for the script is simply: <?php session_start(); session_register('count'); $_SESSION["count"]++; echo "<P>You've been here {$_SESSION['count']} times. Thanks! </P>"; ?> It just keeps replying "You've been here 1 times" and new session files (sess_2ff69ce53e8e0bbfe62a8b0face3ebf6, etc) are created in c:\temp\ every time I refresh the page, and count doesn't get incremented. What am I missing here? I'm running PHP 4.2.3 on Win2000. Register_globals is turned off & I've even tried the example code for session mgmt in the PHP manual, but it doesn't seem to work either. Any help would be greatly appreciated. Thanks, z63072

« previous php.general (#121016) next »