0
I already ask forgiveness for some kind of mistake in the creation of the question, I am willing to receive help
I have a login using classes that after logging in the user, who is saved in the BD, after logging in the level of the logged in user is verified because the 3 levels of privileges in the program q do
- Administrator
- Professor
- Pupil
I want to limit some of these users to using only a few functions. But the program only runs is line.
public function Menu($nome, $nivel) #CRIAÇAO DOS MENUS DE ACORDO COM O NIVEL DO USUARIO.
{
if($nivel=2){
echo "<html lang='pt-br'>
<head>
<meta charset='utf-8'/>
<title>Página inicial</title>
<link rel='stylesheet' type='text/css' href='css/style.css' />
</head>
<body >
<div class='menu-container'>
<ul class='menu clearfix'>
<li><a href='?inicio'>Início</a></li>
<li><a href='?disciplinas'>Disciplinas</a>
".
"
</li>
<li><a href='?salas'>Salas</a></li>
<li><a href='?usuarios'>Usuários</a></li>
<li><a href='?perfil'>$nome</a></li>
<li><a href='?sair'>Sair</a></li>
</ul>
</div>
</body>
</html>";
}
$nivel=2
is an assignment within the if.– rray