Re: global sessions

From: Date: Thu, 19 Apr 2001 05:15:34 +0000
Subject: Re: global sessions
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-49323@lists.php.net to get a copy of this message
In article <9bjvo1$irv$1@toye.p.sourceforge.net>, ben@nyip.net ("Ben") wrote: > i'm trying to use sessions with my project, but it seems that registered > variables in a session aren't global by default. They should be. Can you show an example of the code that leads you to believe they're not? > It doesn't even seem like the session is global, because if I reference the > sessionid (which only shows up if cookies are disabled) > by using <?=SID?>, it shows up within a function, if I reference it from > within the function. That's because SID is a constant (no dollar sign). Only variables have to be declared as global before using the global version in a function. -- CC

« previous php.general (#49323) next »