Active users online for today !

Started on the old forum in February 2011 · view the original in the archive · old links redirect here

1 reply · 350 views · started 15 years ago · 1 min read

2 participants
Donostex Junior · 17 posts #1

Please php coders, i want to show the list of active users but it really kicking me out. Please i need some one to tell me whats wrong with the code i am using. This the code i tried to use below

$acts=$db->select(SELECT user, userid, username, groupid FROM b_users WHERE tsgone>'".(time()-(246060))."' ORDER BY userid ASC"); if($acts){print"-Active users"; foreach($acts as $act){if($act->banned==1) print"<a href="".$cofig->url."profile.php?uid=".$act->userid.""><strike>$act->username</strike></a>,"; else print"<a href="".$act->url."profile.php?uid=".$act->userid."">groupid]['color']."">$act->username</a>,";

i want to be a talented php coder 🙂

frostymarvelous Senior · 266 posts #2

First of all, what is your error? Using - 60 * 60 * 24 will give you the past 24 hours. If you want from the start of the day, use

$day = time() - ( (60 * 60 * date('H')) + (60 * date('i')) + date('s'));

Perfection comes at a cost

I accept liberty!

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