Page 1 of 1

After session destroy, how to restrict 'Back' buttons

Posted: Wed Jan 22, 2003 2:26 am
by senthil
Hi,

I implemented login/logout area using sessions. Its working fine. When the user logs out, I destroy the session. So, if he clicks on any link, it will ask him to login again. But I'm still able to browse through the site using back and forward button in the browser. Can anyone tell me how to avoid this?

Thanks
Senthil

Posted: Wed Jan 22, 2003 5:50 am
by evilcoder
in your logout.php page:

<?php

session_destroy();

echo "<meta http-equiv =\"Refresh\" content = \"0; URL=index.php\">";

?>

That way, they don't stay on the logout page, and the session is completely destroyed.