I want a drop-down menu only to be able to see the links to the sites to which you have permission. For this I apply a variable with the function SESSION
and if it is one level or another I indicate that you can see or not see the menu.
Right now I have two examples but none of them works for me, I can only make it work by applying a single condition in the IF
but of course, I need several at a time because I have 5 user levels.
<?php
if (!isset($_SESSION["privilegio"]) || $_SESSION["privilegio"] == 5 and $_SESSION["privilegio"] == 3) {
echo '<li><a href="../categoria/index.php"><i class="fa fa-circle-o"></i> Tabla Categorías</a></li>';
echo '<li><a href="../subcategoria/index.php"><i class="fa fa-circle-o"></i> Tabla Subcategorías</a></li>';
echo '<li><a href="../tipodocumentos/index.php"><i class="fa fa-circle-o"></i> Tabla Tipo de Documentos</a></li>';
}
?>
And this is the other:
<?php
if (!isset($_SESSION["privilegio"]) || $_SESSION["privilegio"] == 5 and == 3) {
echo '<li><a href="../categoria/index.php"><i class="fa fa-circle-o"></i> Tabla Categorías</a></li>';
echo '<li><a href="../subcategoria/index.php"><i class="fa fa-circle-o"></i> Tabla Subcategorías</a></li>';
echo '<li><a href="../tipodocumentos/index.php"><i class="fa fa-circle-o"></i> Tabla Tipo de Documentos</a></li>';
}
?>