Jump to content

urgent! users online only displaying one!


localhost

Recommended Posts

my users online script is only displaying one user even if two are active in the past 5 minutes...any ideas?

script:
[code=php:0]$FiveMinutes = time()-300;

$UsersOnline = Query("Select * From `users` Where `LastActive` >= '" . $FiveMinutes . "'");
while ($FetchUsers = FetchArray($UsersOnline)) {
$User = array($FetchUsers['Username']); }

$Template = new Template("templates/ForumStatistics.tpl");
$Template->Tags(array(
'MemberCount' => "$MemberCount",
'ThreadCount' => "$ThreadCount",
'PostCount' => "$PostCount",
'UsersOnline' => "" . implode(", ", $User) . ""));
$Template->Display();
[/code]

thanks!
Link to comment
Share on other sites

hi localhost

i also want to do something about count user online,i look yours script ,i have a question ..

like here:"$UsersOnline = Query("Select * From `users` Where `LastActive` >= '" . $FiveMinutes . "'");"

what is "lastActive" and how can you control it?

thanks... 
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.