A: 

First you need to make sure that your logout function is working properly. To verify this, click the back button, then click refresh. If you still see the details you should not bee seeing, there is something wrong with you logout function.

Next, you need to inspect (and change the) value of session_cache_limiter(). A value of nocache is the safest one and assures the browser does not cache the page; trying to access the page via back button is impossible.

You can also change the value of session.cache_limiter in php.ini.

Edit ----

You can set session.cache_limiter by calling session_cache_limiter() before calling session_start()

session_cache_limiter( 'nocache' );
session_start( );

Not recommended method is to edit the PHP.ini file. You should add this line (or edit it if it already exist):

session.cache_limiter = nocache
Salman A
how do i change the value of session_cache_limiter()?
jabsy
A: 

first make sure your session is destroyed using session_destroy function or unset the whole session array.

and in print the session array in test page after logout. this will give you which session variables are there. use isset method to check whether or not session variables exist.

hardik
A: 

Sometimes session_unset and session_destroy does not clear the session data.

Reference: http://www.dmxzone.com/forum/topic/14240/

I have similar experience. Perhaps it is because of not using the methods properly.

Quickfix:

if you want to unset a particular session variable:

$_SESSION["variable"]="";

That will 'unset it'

To unset the whole SESSION

$_SESSION=array();

I seriously do NOT know how valid these are as recommended programming practices, however, they work for me.

FROM the manuals

If a globalized variable is unset() inside of a function, only the local variable is destroyed. The variable in the calling environment will retain the same value as before unset() was called.

and

session_destroy() destroys all of the data associated with the current session. It does not unset any of the global variables associated with the session, or unset the session cookie. To use the session variables again, session_start() has to be called.

In order to kill the session altogether, like to log the user out, the session id must also be unset. If a cookie is used to propagate the session id (default behavior), then the session cookie must be deleted. setcookie() may be used for that.

Perhaps other users can add more to this answer. Plus the manuals at php.net have very informative comments with sample code.

abel