PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
you don't even need to move there name around. Add a column for each user that is defaultly offline. Then at the header of your page include a function wich changes the offline to online.
Then once every 15 minutes or so check who is still "online" and how long they have been for.
That reminds me you also need to have a column for the time they were recorded "online".
$sql = mysql_query("UPDATE users SET status='online' AND time='$curtime' WHERE username='$username' LIMIT 1");
cron... if it must run every 15 minutes... but who's online stuff, can be done on any normal page request. Online lists aren't important if no one is looking at it