1
I did a test and put a way to identify when the user is logged in to the site, and this is working well. But when I get relaxed and go to the index, which is the page I put the code, the error appears
Notice: Undefined index: nivel in C: Program Files (x86) Easyphp-Devserver-14.1VC9 data localweb site tcc index.php on line 5
I wanted to know a way to get it out when it’s out, and only to show the message I put to the users who logged in. Code that I used
<?php
session_start();
include "php/conexao.php";
if($_SESSION['nivel'] == "admin" || $_SESSION['nivel']== "usuario"){
echo "oi logado";
}
?>
Thank you, that’s right!!
– lua
Good!! You’re welcome!
– Lindomar