Due to popular response, I updated WhosOnline. I changed a few things. I took out the lazy connection because it was giving to many errors. You now connect, set the table, update, and then can display the data. I know, I know, that’s TWO whole lines more code. Sorry.
The biggest feature is the ability to show WHO is online, not just a count!!! You will need to have a variable that has the users login name, which most coders store as a session variable, or a global variable. Both are perfectly acceptable. You simply set the users name, update it, and then retrieve the data as an ARRAY. The array will show who is online, the number of “Guests” online, and the number of members, and the overall count of people. PRETTY SLICK.