Hij weergeeft maar één lid als er bijv 2 online zijn.
de code.
PHP
$dbres = mysql_query("SELECT * FROM Members WHERE lastlogin > 300 ORDER BY nickname DESC");
$tpl->assign("count", mysql_num_rows($dbres));
if(mysql_num_rows($dbres) == 0)
{
$tpl->newBlock("check");
$tpl->assign("result", "Geen");
}
else
{
while($result = mysql_fetch_assoc($dbres))
{
$dbres = mysql_query("SELECT * FROM Members WHERE nickname = '" .$result['nickname']. "'");
$user = mysql_fetch_assoc($dbres);
$tpl->newBlock("check");
$tpl->assign("result", "<a href=\"user.php?uid=" .$user['id']. "\">" .ucfirst($result['nickname']). "</a> - ");
}
}
Toon Meer
Wat doe ik fout?