Clit
Posting Freak
- Feb 25, 2012
- 1,065
- 103
Code:
<?php
$GetUsers = mysql_query("SELECT * FROM users WHERE vip = '1' ORDER BY RAND() LIMIT 3");
while($Users = mysql_fetch_assoc($GetUsers))
{
echo "<div class=\"ContentBox\"><div class=\"BoxHeader\" id=\"blue\">{$Users['name']}</div><div class=\"BoxContent\"><p>";
$GetUsers = mysql_query("SELECT username,motto,last_online,online,look FROM users WHERE vip = '1' ORDER BY RAND() LIMIT 3");
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']}&direction=2&head_direction=3&gesture=sml&size=2\">"
."<p style=\"margin-left:80px;margin-top:20px;\"><strong>{$Users['username']}</strong><br>{$Users['motto']}</p>"
."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
}
echo "</p></div></div>";
}
?>
I need it so it excludes rank above the number i set it to,
Fixed myself
PHP:
<?php
$GetUsers = mysql_query("SELECT * FROM users WHERE rank = '3' OR rank = '4' ORDER BY RAND() LIMIT 3");
while($Users = mysql_fetch_assoc($GetUsers))
{
echo "<div class=\"ContentBox\"><div class=\"BoxHeader\" id=\"blue\">{$Users['name']}</div><div class=\"BoxContent\"><p>";
$GetUsers = mysql_query("SELECT username,motto,last_online,online,look FROM users WHERE rank = '3' OR rank = '4' ORDER BY RAND() LIMIT 3");
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']}&direction=2&head_direction=3&gesture=sml&size=2\">"
."<p style=\"margin-left:80px;margin-top:20px;\"><strong>{$Users['username']}</strong><br>{$Users['motto']}</p>"
."<p style=\"float:right;margin-top:-30px;margin-right:5px;\">{$OnlineStatus}</p><br><br><br>";
}
echo "</p></div></div>";
}
?>