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
https://forums.phpfreaks.com/topic/20453-urgent-users-online-only-displaying-one/
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... 

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.