You do realize that this thread is 8 months old? :-)
"i hate to tell you this but yes seesions would be the best way to do this."
No they are not. :-)
"create a page that starts your session and then in the database create some type of session ID that would then corresponde to that person user name."
Compare that with what I suggested:
"In order to identify a user, he/she has to log on, so you can store his/her identity in a database"
The user must already exist in the database before he can log on. That means he has a userid. You would store that userid in the database to see if he is online.
" then you query that session ID to see "who's online"."
How exactly?
Would you do a 'select *' to get all the session_id's of the loggedin people, and then open all their sessions one by one to get their names?
If you just store the user's id, you can do a simple join between the 'logon' table and the 'userdata' table and save yourself a ton of work.
" you could then write something to control the time the sessions stay active or what ever else you wanted to do."
You can simply do a query to delete all the logon records that are older than x minutes.
That is a very small query so you can run it on every page-view.
"sessions are not hard and are best way to do this."
they are indeed not hard, but they are useless for this particular application.