0

Hai

I made a login system in php and every thing working fine in IE and mozilla. But in Safari and in Opera when I click sign out then it works fine and after that if I press back button in browser then it comes to the previous page (myaccount page ) and shows the contents in that page even if I logout. I used the following code for session destroy

session_start();
$_SESSION = array();
session_destroy();
unset($_SESSION['mysiteUser']);
unset($_SESSION['mysiteUser']);

I am in a critical stage please help me with a right advise.

Thanks in advance
Rajeesh

3
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by cwarn23
0

Did you include logic on your myaccount page (and all the other pages on your site) to redirect to the login page if no active session is detected? If not, I think that would be a way to solve your problem.

0

Hai

Everything is done and working perfectly other than in safari and opera. I think this is because of page caching. Bcoz if I press back button in browser then it will return to "myAccount" page and it will redirected to logout page when I press "refresh" . Is there is any way to avoid that please help

Thanks
Rajeesh

Did you include logic on your myaccount page (and all the other pages on your site) to redirect to the login page if no active session is detected? If not, I think that would be a way to solve your problem.

0

It is in the users cache and although they can press back and view the pages they can't click any links or make any changes. Then this comes to the question disabling the back button which I believe isn't possible but you never know what's possible.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.