Menu
Forums
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Trending
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
Upgrades
Log in
Register
What's new
Search
Search
Search titles only
By:
All threads
Latest threads
New posts
Trending threads
New posts
Search forums
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
Server Development
Habbo Retros
Habbo Q&A
Staff page Ranks
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Stephan" data-source="post: 115893" data-attributes="member: 18646"><p>Hello. Can someone help me with my staff page? When I enter this PHP code on my website it shows the rank ID 5 and higher. But I only want the rank ID 5 and not higher and not lower. How to do that? Here's the PHP code:</p><p></p><p>[PHP]<?php</p><p> $GetRanks = mysql_query("SELECT id, name FROM ranks WHERE id > '5' ORDER BY id DESC");</p><p> while($Ranks = mysql_fetch_assoc($GetRanks))</p><p> {</p><p> $GetUsers = mysql_query("SELECT username,motto,last_online,online,look FROM users WHERE rank = {$Ranks['id']}");</p><p> while($Users = mysql_fetch_assoc($GetUsers))</p><p> {</p><p> if($Users['online'] == 1){ $OnlineStatus = "<font color=\"green\">Online</font>"; } else { $OnlineStatus = "<font color=\"red\">Offline</font>"; }</p><p> echo "<img style=\"position:absolute;\" src=\"http://www.habbo.nl/habbo-imaging/avatarimage?figure={$Users['look']}&head_direction=3&direction=3&gesture=sml&action=std&size=b\">"</p><p> ."<p style=\"margin-left:70px;margin-top:40px;\"><strong>{$Users['username']} ({$OnlineStatus})</strong><br>Missie: <i>{$Users['motto']}</i><br><small>Laatste bezoek: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p><br><br>";</p><p> }</p><p> echo "</p><br>";</p><p> }</p><p>?>[/PHP]</p><p></p><p>Thanks for helping.</p></blockquote><p></p>
[QUOTE="Stephan, post: 115893, member: 18646"] Hello. Can someone help me with my staff page? When I enter this PHP code on my website it shows the rank ID 5 and higher. But I only want the rank ID 5 and not higher and not lower. How to do that? Here's the PHP code: [PHP]<?php $GetRanks = mysql_query("SELECT id, name FROM ranks WHERE id > '5' ORDER BY id DESC"); while($Ranks = mysql_fetch_assoc($GetRanks)) { $GetUsers = mysql_query("SELECT username,motto,last_online,online,look FROM users WHERE rank = {$Ranks['id']}"); while($Users = mysql_fetch_assoc($GetUsers)) { if($Users['online'] == 1){ $OnlineStatus = "<font color=\"green\">Online</font>"; } else { $OnlineStatus = "<font color=\"red\">Offline</font>"; } echo "<img style=\"position:absolute;\" src=\"http://www.habbo.nl/habbo-imaging/avatarimage?figure={$Users['look']}&head_direction=3&direction=3&gesture=sml&action=std&size=b\">" ."<p style=\"margin-left:70px;margin-top:40px;\"><strong>{$Users['username']} ({$OnlineStatus})</strong><br>Missie: <i>{$Users['motto']}</i><br><small>Laatste bezoek: ". date("D, d F Y H:i (P)", $Users['last_online']) ."</small></p><br><br>"; } echo "</p><br>"; } ?>[/PHP] Thanks for helping. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
Server Development
Habbo Retros
Habbo Q&A
Staff page Ranks
Top