Muffmuncher
Member
- Jan 11, 2012
- 61
- 12
Atm, the following shows in order the users who have the most amount of credits.
How do I edit it so as it also shows their looks?
Referring to:
I tried this, but I'm just not good at this:
Any help? Thanks in advance.
PHP:
<?PHP
$sql = mysql_query("SELECT * FROM users WHERE rank < 4 ORDER BY credits DESC LIMIT 10");
while($a = mysql_fetch_array($sql)) {
echo "<tr>
<td class='tablerow1' align='center'><hr />".filter($a['username'])."</a></td>
<td class='tablerow2' align='center'><hr />".Filter($a['credits'])."</td>
</tr>";
} ?>
How do I edit it so as it also shows their looks?
Referring to:
PHP:
<?php
$GetRanks = mysql_query("SELECT id,name FROM ranks WHERE id >= 4 ORDER BY id DESC");
while($Ranks = mysql_fetch_assoc($GetRanks))
{
echo "<div class=\"habblet-container \"><div class=\"cbb clearfix blue \"><h2 class=\"title\">{$Ranks['name']}s</h2><div style=\"padding:5px\"><p>";
$GetUsers = mysql_query("SELECT username,motto,rank,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");
while($Users = mysql_fetch_assoc($GetUsers))
{
if($Users['online'] == 1){ $OnlineStatus = "<font color=\"darkgreen\"><b>Online</b></font>"; } else { $OnlineStatus = "<font color=\"darkred\"><b>Offline</b></font>"; }
echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=l\">"
."<p style=\"margin-left:80px;margin-top:20px;\">Username: <strong>{$Users['username']}</strong><br>Motto: <strong>{$Users['motto']}</strong><br><small>Last Online: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p>"
."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
}
echo "</div></div></div>";
}
?>
I tried this, but I'm just not good at this:
PHP:
<?PHP
$sql = mysql_query("SELECT * FROM users WHERE rank < 4 ORDER BY credits DESC LIMIT 10");
while($sql = mysql_fetch_assoc($sql))
{
while($a = mysql_fetch_array($sql))
{
echo "<img style=\"position:absolute;\" src=\"http://www.habbo.com/habbo-imaging/avatarimage?figure={$Users['look']}&action=wav&direction=2&head_direction=3&gesture=srp&size=l\">"
.echo "<tr>
<td class='tablerow1' align='center'><hr />".filter($a['username'])."</a></td>
<td class='tablerow2' align='center'><hr />".Filter($a['credits'])."</td>
</tr>";
}
}
?>
Any help? Thanks in advance.