Now I have a website , when I press log out button it return me to the login page, but if I change the url of the browser to menu.php for an example, I found the user is still on , I don't know how do I kill the session completely .
logout button will direct the user to logout.php which has the following code
<?php
session_unset();
session_destroy();
header("Location: index.php");
exit();
?>
I was in menu.php and I click on Logout button. It direceted me to index.php as it's suppose to be. When I changed the url of the browser from index.php to menu.php I found the welcome message containing the last user name in!
menu.php suppose to not open if you click logout and did not sign in again