3raser Posted March 6, 2011 Share Posted March 6, 2011 My code: <?php $username = $_SESSION['loggedin']; $extract_user_rank = mysql_query("SELECT `rank` FROM users WHERE username='$username'"); if($extract_user_rank['rank'] > 0) { echo "<a href='control_panel.php'>Admin Control Panel</a>"; } else { //return nothing } ?> I have my rank in the database set to 1. Why doesn't it output the ACP link? Link to comment https://forums.phpfreaks.com/topic/229802-doesnt-display-acp-link/ Share on other sites More sharing options...
Pikachu2000 Posted March 6, 2011 Share Posted March 6, 2011 Because $extract_user_rank is a query result resource, not a value. mysql_fetch_*() it from the resource. Link to comment https://forums.phpfreaks.com/topic/229802-doesnt-display-acp-link/#findComment-1183680 Share on other sites More sharing options...
3raser Posted March 6, 2011 Author Share Posted March 6, 2011 Because $extract_user_rank is a query result resource, not a value. mysql_fetch_*() it from the resource. *facepalm* Thank you kind sir. Link to comment https://forums.phpfreaks.com/topic/229802-doesnt-display-acp-link/#findComment-1183687 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.