Hello sir,
In my project i need to display online user in sandbox.For it i have made a login_status field in users table.When any user login to website it becomes true and if a user logout then it's value changed to false.but if a user leaves website without logout then i am unable to show him offline or changes login status to false.Is there any way to find out which user is searching website and whichone left the website without logout.
Recommended Answers
Jump to PostYou can use Javascript to capture the onlcose event of the window and request that a user logs out properly, look at this page for instructions: http://royaltutorials.com/javascript-popup-onclose/
Also, you can have another field in your DB that records the time of the last action of the logged in …
All 2 Replies
Reply to this topic
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.