PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have a few project where users log in to a secure area, this is just a basic login where the password and username is checked against what is in the database.
I would like other users to be able to see who else is online. How is it possible to know which users from the users table in the database are currently logged in?
Thanks,
Simon
Last edited by thesimon on Tue Apr 12, 2005 4:50 am, edited 1 time in total.
you might want to consider who is online in a interval of time.
Some users might actually leave your website without logging out and come back in about a month; thus, they can't be logged in from the day they left until a month later
thanks d11wtq, however as hongo said some of the users may fail to logout, thus the record wont change back, are any ideas to find out whos sessions are still running.thanks,
Simon
update their activity in a log somewhere and when that last act is sufficient amount of time say 5 mins. old then logout the user. this approach is pretty much used all the time.