php sessions,logouts & the bloomin back button!


Posted on 16th Feb 2014 07:03 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.

Did you know?Explore Trending and Topic pages for more stories like this.
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.
ob_start();

// Initialize a session.
session_start();


Am i doing something wrong?

thanks
No comments posted yet

Your Answer:

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

Expandable Post Code
Hi,

Hope you can help. Which currently I haven't upgraded to connect to a mysql server, so i

Help! refer to a friend script with captcha code
Hi guys, I am posting on here in desperate need for some help with an ongoing search I have been doi

Recode Abap Dynpro into Web Dynpro
Hi All,
A client has asked us to look at rearchitecting a custom transaction that was developed

All possible combinations of String in PL/SQL
Hi All,

Could you please explain the logic of getting all possible combinations of String

Count
Getting the same count everytime

Code:
$visitquery = mysql_query("SELECT COUNT(*) FR

Default TimeZone
The server I'm working with is hosted in America so all times inserted into the database are coming

Calling a Procedure with IN & OUT Parameters
Hello,

I usually call my procedures using the following way

declare variable e

PHP Include not working
The website is http://www.grlistingservices.com

The code block is as follows:

<

Must-Know Topics of PHP
Can you guys list the must-know topics of PHP. I am still a learner and I am trying to cover most of

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

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



Play Free Quiz and Win Cash