sessions

From: Date: Fri, 23 Feb 2001 06:34:34 +0000
Subject: sessions
Groups: php.db 
Request: Send a blank email to php-db+get-6900@lists.php.net to get a copy of this message
I am trying to execute the following code. It all works fine if the code is executed second time onwards. When the code is executed for the first time (a new session is created) the value of PHPSESSID is not assigned. Could this be because session.auto_start is assigned a value of 0 ? What could be a workaround for this ?? Thanks <?php session_start(); session_register ("count"); $count++; echo $PHPSESSID; ?> Hello visitor, you have seen this page <?php echo $count; ?> times.<p> <php? # the <?=SID?> is necessary to preserve the session id # in the case that the user has disabled cookies ?> To continue, <A HREF="nextpage.php?<?=$PHPSESSID?>">click here</A>

« previous php.db (#6900) next »