povedijah
Member
- Joined
- Jan 11, 2010
- Messages
- 93
- Reaction score
- 6
Hello to everyone!
I'm trying to add to my web , the script of 5 highest levels, I have searched i have found some, but do nothing, i did not give errors, here I leave some examples:
Maybe anyone have the correct one.
Thank you!
I'm trying to add to my web , the script of 5 highest levels, I have searched i have found some, but do nothing, i did not give errors, here I leave some examples:
Code:
<?PHP
$position = 1;
foreach($SQL->query('SELECT `name`,`level`, `online` FROM players ORDER BY `level` DESC LIMIT 7') as $i => $data)
{
echo $position . ' <a style="font-weight:bold;text-decoration:none;" href="?subtopic=characters&name='.urlencode($data['name']).'">'.($data['online']>0 ? "<font color=\"green\">".htmlspecialchars($data['name'])."</font>" : "<font color=\"red\">".htmlspecialchars($data['name'])."</font>").'</a> ( ' . $data[level] . ' )<br>';
$position = $position+1;
}
?>
Maybe anyone have the correct one.
Thank you!