Can any one here give me the code for first 5 online users at index with their avatars,.. Thank you?
5 Online Users at index
Collapse
X
-
Something like
PHP Code:// You can use MySQL JOIN but whatever
$onusrs = mysql_fetch_array(mysql_query('SELECT uid FROM ibwf_online LIMIT 0, 5'));
echo 'Online Users<br/>';
if(count($onusrs) > 0){
foreach($onusrs as $usr){
$user = (object) mysql_fetch_array(mysql_query('SELECT * FROM ibwf_users WHERE id="'.$usr[0].'"'));
// User details...
echo $user->username.' ('.$user->sex.'/'.$user->location.')<br/>';
}
}
Comment
Comment