I have a SESSION that supports about 80 users, I want to print all their usernames and refresh the page every 60 seconds or so. I know how to refresh the page but <?php print_r($_SESSION['username']); ?> is only printing the username associated with my personal session.
I have a SESSION that supports about 80 users, I want to print all
Share
Unfortunately sessions variables don’t work like that.
For you to track each session, one method would be to log each login/connection to a MySQL table with a time stamp attached to it.
Then on your tracking page, have it delete the inactive users, then select the rest:
ie
Then toss in a
<meta http-equiv="refresh" content="60">to refresh the page ever minute.