I have edited my question.., I have 10 users in my database table and the number may vary. In which only 3 users(It may be random) have to access the page given under if condition. The other users should be redirected to button.php page with a parameter. I have identified the users with $aces variable. So in if condition, I have specified only that 3 users with Not equal to condition. If the logged in user is in the 3, then he is able to access the followed page. Otherwise user should be redirected to button_page.php with a message that "You are not authorised to access this page". Now the '!=' operator doesn't work. if i use '==' operator for example of 3 users it works fine. How to use '!=' operator in if condition??
session_start();
$aces='';
if(!isset($_SESSION['ID'])){
header("Location:login.php");
}
$aces=$_SESSION['Access'];
if($aces != 1 || $aces != 2 || $aces != 0){
header("Location:button_page.php?m");
exit;
}