Showing online users!

From: Date: Wed, 25 Sep 2002 03:47:48 +0000
Subject: Showing online users!
Groups: php.general 
Request: Send a blank email to php-general+get-117496@lists.php.net to get a copy of this message
The best way to show online users ... every page that is loaded while a user is online the time stamp is updated in there profile <? $sql = "SELECT sUser FROM members WHERE sUpdated > from_unixtime(unix_timestamp(now())-(10*60))"; $sql_result = mysql_query($sql, $connection) or die (mysql_error()); while ($row = mysql_fetch_array($sql_result)) { $sUser=$row["sUser"]; echo"<b><a href=\"/actual/thesite.php?startWeb=profile&sUser=$sUser\">$sUser</a></b>, "; } ?> Is this the best way to do this? --- Philip J. Newman. Head Developer. PhilipNZ.com New Zealand Ltd. http://www.philipnz.com/ info@philipnz.com Mob: +64 (25) 6144012. Tele: +64 (9) 5769491. Family Site: Philip J. Newman Internet Developer http://www.newman.net.nz/ info@newman.net.nz ***************************** Friends are like Stars, You can't always see them, But you know they are there. *****************************

« previous php.general (#117496) next »