RE: [PHP] session management

From: Date: Wed, 23 Oct 2002 03:08:02 +0000
Subject: RE: [PHP] session management
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-121020@lists.php.net to get a copy of this message
That script works for me. Are you sure the session cookie is being set? What browser are you using? ---John Holmes... > -----Original Message----- > From: z63072 [mailto:z63072@mail.com] > Sent: Tuesday, October 22, 2002 9:50 PM > To: php-general@lists.php.net > Subject: [PHP] session management > > 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 > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#121020) next »