Allow a certain logged-in ID only

0

My site saves the user ID in the database, so it, when logged in, has the ID. I wanted to get some sort of code that would do the following task:

When a user is logged in with an "x" ID on the site and is going through pages, then on a certain page, he is not allowed to access that particular page, and when he is redirected to another page, he is not allowed . Only users that contain for example the allowed.txt (or PHP) file, have these permissions ...

I even have something similar but it just works the opposite way I want it, that is, instead of allowing the ID it blocks it, I wanted something in reverse .. Below is what I have:

}
    }else{
        header('Location: ?type=status');
    }
}

if($user->id =="1000012034731" || $user->id =="4"){
    echo "Tenha um bom dia! Você está bloqueado...!!";
    echo "<br>";
    echo " Nossa equipe detectou algo errado em sua conta.";
    exit;
}

if(isset($_POST['logout'])) {
    session_destroy();
    header('Location: index.php?i=Logout Success..!! ');
}
?>

Note: I have tried to change the signs of "==" to different, even more so.

    
asked by anonymous 14.06.2017 / 04:50

0 answers