5 Online Users at index

Started on the old forum in November 2010 · view the original in the archive · old links redirect here

4 replies · 409 views · started 16 years ago · 1 min read

4 participants
hunter-x-hunter Junior · 29 posts #1

Can any one here give me the code for first 5 online users at index with their avatars,.. Thank you?

centi Developer · 159 posts #2

show me a demo.... ill code it exactly the same 4 ya

😳 .................................... http://photomag.lk/ .................................... 🤨

CreativityKills Lead · 833 posts #5

Something like

// 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/>';
}
}

Write your reply now; next you create a free account (or sign in) and it is posted right away. Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close