Guest mbtemiz Posted June 25, 2006 Share Posted June 25, 2006 in forum pages, at the end of the page you can see online users. but i couldn't understand how did they do it. i 've looked up some codes releated to this problem but i didn't understand. they were very complicated. can smbdy help me?? Link to comment Share on other sites More sharing options...
scott100 Posted June 25, 2006 Share Posted June 25, 2006 in forum pages, at the end of the page you can see online users. but i couldn't understand how did they do it. i 've looked up some codes releated to this problem but i didn't understand. they were very complicated. can smbdy help me??<{POST_SNAPBACK}> I'm guessing that when you create an account for the forum there is a "logged-in" field stored in the database, when you log in it becomes true, when you log out it becomes false.Then when you view the page the code checks for everyone whose status is true and prints their name to the page. Link to comment Share on other sites More sharing options...
justsomeguy Posted June 26, 2006 Share Posted June 26, 2006 You can also keep a date stamp of when the last page view for a user is, and when you display who is online you get users who viewed a page in the last 5 or 10 or 15 minutes or whatever you want. The problem with having a "logged in" field is that people don't always log out, they just close the window. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now