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? Quote Link to comment 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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.