I have a written a blog using php and mysql which has a login feature. When you are logged out and hit back it should not show the features of a member since you are no longer logged in. How do I correct it so that when a user is no longer logged in and hit back button, the previous page should be in the state before he logged in?
Share
It’s hard to discern what authentication mechanism you’re using, but assuming this is a pure caching issue you can add the following statements to the beginning of all .php pages displayed while logged in.
That should take care of caching issues. And make sure that you
unset()the access variable you used to keep track of wether or not the user is logged in (in$_SESSIONor similar).