>I need to write application which tell me
who is login. In example:
1. login as Shamrock
2. I see Shamrock login
3. someone login as Morbious
4. They both see : Shamrock & Morbious
5. Shamrock logout
6. Morbious refresh site and see only Morbious is logged
Any sugesstions ?
Browsers don't log out. Users rarely log out (if you provide a
link to log out and the login is protecting sufficiently sensitive
information, a few of your users MIGHT use it).
The closest you can usually get is to (a) decide that a person is
logged out if the last page refresh is older than X time, and (b)
process explicit logouts if someone actually uses them.
Put the login info in a database. If they refresh a page, update
the last_refreshed_timestamp. To see who is logged in, select the
entries with a login name and whose last_refreshed_timestamp is
later than, say, an hour ago.
Gordon L. Burditt