Re: Sessions and PHP
| From: | John W. Holmes | Date: | Fri, 26 Mar 2004 22:51:57 +0000 |
| Subject: | Re: Sessions and PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-181595@lists.php.net to get a copy of this message | ||
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