Jump to content

Archived

This topic is now archived and is closed to further replies.

juanc

displaying users online

Recommended Posts

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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Hi thanks for this

I'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?

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.