Hey, i am making a forum. The user can log in ok, but now i'm trying to log them out when they click 'log out'. What happens is they click 'log out', the session and all variables are destroyed and a new page appears telling them they have logged out successfully... BUT... they can still press the back button on their browser and it will take them to the previous page. Anyone help me please??
Thanks
BIOSTALL
How are you destroying the session? This is what works for me:
session_start(); $_SESSION = array(); if (isset($_COOKIE[session_name()])) { setcookie(session_name(), '', time() - 42000, '/'); } session_destroy(); echo 'You are now logged out.';