Active users online for today !

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Active users online for today !

    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()-(24*60*60))."' ORDER BY userid ASC"); if($acts){print"-Active users"; foreach($acts as $act){if($act->banned==1) print"<b><a href=\"".$cofig->url."profile.php?uid=".$act->userid."\"><strike><b>$act->username</b></strike></a>,"; else print"<a href=\"".$act->url."profile.php?uid=".$act->userid."\"><font color=\"".$group[$act->groupid]['color']."\"><b>$act->username</font></b></a>,";
    Last edited by Donostex; 06.02.11, 14:20.

    #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!

    Comment

    Working...
    X