Jump to content


Photo

displaying users online


  • Please log in to reply
2 replies to this topic

#1 juanc

juanc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 27 February 2006 - 03:37 PM

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

#2 ReVeR

ReVeR
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 27 February 2006 - 03:41 PM

when the session end/user logs off do this:
 delete from members where ip=userip;
naturally put this into a query string and pass it onto the function.



#3 juanc

juanc
  • Members
  • PipPip
  • Member
  • 16 posts

Posted 27 February 2006 - 03:53 PM

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?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users