Session problems
Posted: Wed Nov 26, 2008 4:46 pm
im new, so sorry if i violated some a rule or 2.. 
im making a website which is like a forum
everything is working great, the accounts,topics,comments,etc but the only problem i have is that im trying to implement something that tells you whos online or not.
This is what im doing:
1 database to store all of the online accounts.
when a session starts(user logs in) i add their name to the "online" list.
when the session ends(user logs out) i remove their name from the "online" list
it works, but the only problem is that idk how to check if the user navigates away from the site, or closes the browser so if they do that, they might stay online, or logg in twice >.<
im making a website which is like a forum
everything is working great, the accounts,topics,comments,etc but the only problem i have is that im trying to implement something that tells you whos online or not.
This is what im doing:
1 database to store all of the online accounts.
when a session starts(user logs in) i add their name to the "online" list.
when the session ends(user logs out) i remove their name from the "online" list
it works, but the only problem is that idk how to check if the user navigates away from the site, or closes the browser so if they do that, they might stay online, or logg in twice >.<