[UPHPU] login session propagation problems
Scott Hill
llihttocs at gmail.com
Thu May 11 09:46:58 MDT 2006
On 5/11/06, Steve Dibb <steve at wonkabar.org> wrote:
>
> You can be even more lazy than that. You could just do
> if($_SESSION['var']) and it will return true / false if it's set. It
> might throw a PHP Notice though. I can't remember.
>
> For good, readable code though, you should use isset.
>
> And what does session_is_registered() do? Sets 'global' variables? Huh?
>
> Steve
I wasn't aware it even existed until now and I don't really see the point of
it. If you want to use data that is in the $_SESSION array why not just use
isset or as you said a simple if condition (although it does give a nice PHP
notice if it the $_SESSION variable does not exist yet). Maybe it is from
an earlier era when $_SESSION didn't exist yet. It seems to work and
doesn't hurt anything but I will probably forget about after today and keep
using isset.
--
Scott Hill
"May you solve interesting problems" - Author Unknown
"A fanatic is one who can't change his mind and won't change the subject." -
Sir Winston Churchill
More information about the UPHPU
mailing list