php sessions,logouts & the bloomin back button!

Posted on 16th Feb 2014 01:33 pm by admin

Hi All,

I've got a cms that members can log into. When they logout, the session is destroyed, however, if you click the back button, you can get back into the CMS.

How can I get around this?
My logout code has

$_SESSION = array(); // Destroy the variables.
session_destroy(); // Destroy the session itself.
setcookie (session_name(), '', time()-300, '/', '', 0); // Destroy the cookie.

I've also tried adding this to my header file

// HTTP/1.1
header("cache-Control: no-store, no-cache, must-revalidate");
header("cache-Control: post-check=0, pre-check=0", false);
// HTTP/1.0
header("Pragma: no-cache");
// Date in the past
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
// always modified
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");

// This page begins the HTML header for the site.

// Start output buffering.

// Initialize a session.

Am i doing something wrong?


No comments posted yet

Your Answer:

Login to answer
194 Like 53 Dislike
Previous forums Next forums
Other forums

Moncler Vrouwen Down jas met riem Lang Zwart - €233.43 : moncler,

Montblanc Boheme Paso Doble Blue Vulpen [ec85] - €107.88 : Professionele montblanc pen winkels,
mont blanc pennen
[b][url=]montblanc pen[/url][/b]

uomini timberland 6 pollici di stivali outlet online

User registration and login
I don't know whether this is the correct forum, if not i apologise but am pretty desperate at the mo

What's wrong with my code
sobbing for many days, still don't know why please Help. Why my page isn't posted correctly. In a

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Google+ Indyaspeak @ Pinterest RSS

Operation not allowed when innodb_forced_recovery > 0.