Hello
In my php file I have the code
page.php
session_start();
$valor = isset($_SESSION['usuario']) ? 'S' : 'N';
if($valor == 'N'){
header('location: .');
}
echo "Sesssao: ".$valor;
To exit, in another file I do when clicking the link to exit that calls this function
function sair(){
session_destroy();
unset($_SESSION['usuario']);
$_SESSION['usuario'] = null;
header('location: .');
session_commit();
}
But how much I access the direct page that verifies the session, without going through the login he said that there is always a session will be if it is by the word session_start ();