note 12195 deleted from function.session-start by jimw

From: Date: Fri, 07 Dec 2001 20:26:10 +0000
Subject: note 12195 deleted from function.session-start by jimw
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-21905@lists.php.net to get a copy of this message
Alright, I couldn't get the example below to work that was posted by show2sh@yahoo.com... IF (!$PHPSESSID) {...} ... did not work, kept getting problems with undefined variable errors when coming into the page while by-passing page 1...so I solved it with the following... Page 1 ------ <? session_start(); session_register('Harry'); session_register('Sally'); $Harry = 'NULL'; $Sally = 0; ?> Page 2 ------ <? session_start(); IF ((!isset($Harry)) || (!isset ($Sally))) : session_register('Harry'); session_register('Sally'); $Harry = 'NULL'; $Sally = 0; ENDIF; ?> ---- Hopefully this helps...

« previous php.notes (#21905) next »