RE: [PHP] Session confusion again :( - Thanks!

From: Date: Thu, 15 Apr 2004 11:35:19 +0000
Subject: RE: [PHP] Session confusion again :( - Thanks!
Groups: php.general 
Request: Send a blank email to php-general+get-183444@lists.php.net to get a copy of this message
On 14 April 2004 17:53, Paul Fine wrote: > Thanks guys but I have register globals ON so once the > session variable is > defined I should be able to address it without specifying $_SESSION ? I don't think the documentation is clear on this point -- it may be that the association between the global variable and the $_SESSION array doesn't "take" until the next page load and session_start(), and in any case the behaviour seems to be different between 4.2 and 4.3. I *think* you may have to session_register('element_countp') to make the association in the current page, but this is buggy and seriously disrecommended in 4.2 (although fixed in 4.3). Personally, I'd just use the $_SESSION[] variable anyway, and not bother with the equivalent global. Cheers! Mike --------------------------------------------------------------------- Mike Ford, Electronic Information Services Adviser, Learning Support Services, Learning & Information Services, JG125, James Graham Building, Leeds Metropolitan University, Beckett Park, LEEDS, LS6 3QS, United Kingdom Email: m.ford@leedsmet.ac.uk Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211

« previous php.general (#183444) next »