mercredi 10 juin 2020

Header issue does not load the right one

Hi so i have couple of headers that have diffedent menus for different users and my code is

if (isset($_SESSION["role"])== "engineer" or isset($_SESSION["role"])!="admin") {
    include 'engineerheader.php';
  }else if (isset($_SESSION["role"])!= "engineer" or isset($_SESSION["role"])=="admin") {
    include 'adminheader.php';

 } else{
    include 'workerheader.php';
  }

When i log in as admin and open from the menu the worker site it shows me the engineer menu. I tried different ways of IF statements but no luck. Also if there is only one include header it works as it should but i want the admin user to have access to all sites and keep the header for the admin not to be changed when it goes to worker site with the engineer header.

Thanks

Aucun commentaire:

Enregistrer un commentaire