juanc Posted February 27, 2006 Share Posted February 27, 2006 Hi I basically just need to be able to display all logged in users.The actual log in authentication I'm able to cope with and I can also get logged in users into a dbase table so as to display them. However I'm stuck on how to delete them from the table in the event of them logging off the site. I found tutorials but as always seems to be the case they're never exactly what you need. In short how can I clean up a mySQL table if the user logs off and the session ends.thanks Juan Quote Link to comment https://forums.phpfreaks.com/topic/3677-displaying-users-online/ Share on other sites More sharing options...
ReVeR Posted February 27, 2006 Share Posted February 27, 2006 when the session end/user logs off do this:[code] delete from members where ip=userip;[/code]naturally put this into a query string and pass it onto the function. Quote Link to comment https://forums.phpfreaks.com/topic/3677-displaying-users-online/#findComment-12738 Share on other sites More sharing options...
juanc Posted February 27, 2006 Author Share Posted February 27, 2006 Hi thanks for thisI'm guessing you envisage a button for people to logout and then unset the session............and then call a function to delete the table row where that ip occurs.The thing is it's actually for a company intranet and so everyone will have the same ip and secondly is there any way of doing this if the user justs closes their browser window? Quote Link to comment https://forums.phpfreaks.com/topic/3677-displaying-users-online/#findComment-12739 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.