Re: Sessions and PHP
| From: | Patrik Fomin | Date: | Sat, 27 Mar 2004 00:57:05 +0000 |
| Subject: | Re: Sessions and PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181597@lists.php.net to get a copy of this message | ||
how do i determine if a session has been destroyed/created ?
patrick
"John W. Holmes" <holmes072000@charter.net> skrev i meddelandet
news:4064B40D.5060500@charter.net...
> Patrik Fomin wrote:
> > Let me rephrase it,
> >
> > i got a login page, once logged in you you got the session
> > $_SESSION['in'] = "true";
> >
> > i want to be able to count the number of people that are logged in atm,
> > so when they logout with either logout button or close the window, i
want to
> > then decrese the number.
> >
> > In asp, you just used Session_Destroy() to determine if all sessions
were
> > destroyed and then
> > APPLICATION['num'] = APPLICATION['num'] - 1
> >
> > Is there anyway in php to do this?
>
> No, as PHP does not have application variables. Keep a count in a file
> and increment / decrement manually.
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> php|architect: The Magazine for PHP Professionals www.phparch.com