How to maintain a session from page to page? I'm getting a problem here when i try to logout, the session is destroy but i still can go inside to that page without login first by using IE Back button or history cache! How can i solve that? Anybody help me please...
PHP Session problem
Collapse
X
-
Tags: None
-
Welcome to theScripts.Originally posted by Fareast AdamHow to maintain a session from page to page? I'm getting a problem here when i try to logout, the session is destroy but i still can go inside to that page without login first by using IE Back button or history cache! How can i solve that? Anybody help me please...
You may have to specify that the page not be cached, and make sure that you not only destroy the session, but clear the $_SESSION array:
[PHP]
$_SESSION = array();
[/PHP] -
Thanks Motoma for reply! But how can you show that will be running? Can you give me some explanation. Regard!Comment
-
i would like to give some example here, simply even for this forum if you logout from your accout you still can be go to your site withuot enter a user name and password by click Back botton! There is a dangerious that other people can threat badly inside your accout! Regard...Comment
-
This is called caching. Browsers do this to save on bandwidth.Originally posted by Fareast Adami would like to give some example here, simply even for this forum if you logout from your accout you still can be go to your site withuot enter a user name and password by click Back botton! There is a dangerious that other people can threat badly inside your accout! Regard...
If you log out from this site, and then hit the back button you can stil see a page but that's okay...If you try to continue on to another page after you log out, you are told to log back in again.Comment
Comment