July 25th, 2000, 03:01 PM
I'm really lost on how to make users see other people on-line!
It goes like this:
The user logs in on the frist page, get a welcome msg and goes on to the Mainpages that contains the a frame with users on-line... but the question how do I make that??
I tried to make it so when the user logged in it send a command to a MySql table and marked him as on! So other could see him.. didnt work to well Because not all users are using the logoutt option and that makes em shown as On-line! So I dumped that code.
Anyone got some great ideas?
[This message has been edited by John M (edited July 25, 2000).]
July 25th, 2000, 04:09 PM
Or you said on another way anyone know how make a message system between the different users?
July 25th, 2000, 06:02 PM
Why not use this:
When a user first logs in (or whatever) a cookie is placed into their browser, and the time stamp stored in the mysql table.
Every time the user loads a page, the cookie+timestamp or renewed.
To view users on line the query selects all time stamps that are under a certain time old (does that make sense).
e.g. the table looks like:
If the current time is 2345695
Then its a fair bet Jon is still online.
(ok excuse the bad numbers)
hope it helps.