-5
I’m having trouble trying to destroy the sessions, I tried the code below, there is some way beyond that?
<?php
session_start();
session_destroy();
header('Location: index.php');
?>
What happens is that the session variables are not destroyed, thus being able to rescue the values contained in it.
What do you mean by "end sessions"?
– Woss
I am trying to make the user perform the "logoff"
– João Vitor
Have you read the job documentation
session_destroy()
?– Woss
Unfortunately, I don’t know what went wrong. When I do Logoff it performs redirection to the page "Index.php" but when I force access to another page like "Home.php", It enters the page usually as if I were logged in. <? php session_start(); session_destroy(); header('Location: index.php'); ? > This is my code for "logoff"
– João Vitor
The question became clearer?
– João Vitor
No, what was the "problem" you’re having?
– Woss
The question has already been answered, I’m trying to make it clearer with the standards of the site. I’ll edit it again.
– João Vitor