3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by diafol
0

How to find online users and their names on site?

Which site you are talking about. Is that you trying to implement some pre-made script available online and got stucked up somewhere

0

Which site you are talking about. Is that you trying to implement some pre-made script available online and got stucked up somewhere

I am developing my own website I want to listout online members and their names on webpage. I allow only registered user to enter into the website so only registered users can access my website

0

I am developing my own website I want to listout online members and their names on webpage. I allow only registered user to enter into the website so only registered users can access my website

create another column named 'Status' in the usermaster table of your database and while the user logs in set the status to 'active'.So on your webpage you can get the count of all the online or logged in user as

"select count(*) from usermaster where status='Active' "

Similary set the status to inactive while logging off from the website

0

Just to jump in there - if user doesn't log off - permanently active. Perhaps the status should be changed to 'last impression' field, so that users only active if opened new page in say last 20 minutes, regardless of whether user is logged in. There are more sophisticated methods of course, but this seems reasonably lightweight.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.