Hey,

So i'm putting together a "community" site and one of the things I'm looking to do is show that the user is currently logged in.

I know it's "easy" to set a field in the mysql table to say that they are logged in... but the question i'm running into is... how do i go about making sure that they are still logged in?

Yes... if they click the log out buttion, i can make it update the database... but how many users auctally do that?

what have u all done?

    create a field in the db that records the time that they login. update it every time they hit a page. then, remove it if (ie log them out) after they havent hit the site after some period of time

      so lets say... i have another user that is viewing there profile... i shoud put some code in that page to check there last active time to the current time... and say that if 15 minutes have passed update the db field as logged out and then go on displaying the page with there logged off info?

      is that way of it?

        Write a Reply...