dvayne Posted April 1, 2008 Share Posted April 1, 2008 <?php session_start(); if($_SESSION['s_logged_n'] == 'true'){ include 'process.php'; $query = mysql_query("SELECT * FROM Users") or die(mysql_error()); $row = mysql_fetch_array($query); if(mysql_num_rows($query) > 0) { if(($row['Activated'] > 0) && ($row['position'] > 1)){ $_SESSION['s_logged_n'] = 'true'; echo 'welcome admin'; } else{ echo 'access denied'; } } ?> <?php } else { header("Location: login.php"); } ?> please check my code the output is access denied even if the value of $row['position'] is greater than 1. please help me... Link to comment https://forums.phpfreaks.com/topic/98984-members-levels/ Share on other sites More sharing options...
uniflare Posted April 1, 2008 Share Posted April 1, 2008 print_r($row) just after fetchiong the array, tell us what it says. also try a lowercase A for activation. Link to comment https://forums.phpfreaks.com/topic/98984-members-levels/#findComment-506516 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.