Monday, 9 September 2013

End Session in PHP

End Session in PHP

i have problem in End session, i have MAIN.PHP where my session starts,
inside my MAIN.php i have<a href = "logout.php">logout</a> this is the
code for my logout.php
<?php
unset($_SESSION['user']);
unset($_SESSION['pass']);
session_destroy();
echo"<script> window.location.href = '../index.php' ; </script>";
exit();
?>
after clicking the link logout, when i press the back button i can still
access the pages and still it holds my SESSION variables.

No comments:

Post a Comment