Page 1 of 1

Browser back button

Posted: Mon Jul 21, 2008 4:14 am
by dumlee
how to control browser back button in case we are destroying session when user clicks on Logout option.

Currently the users who are logged in and log out from there account ther are directed to login page.BUt if they press Browser back button then they are able to do all operations which they r not authorised to do without logging in.

Pls help.

its urgent.

Re: Browser back button

Posted: Mon Jul 21, 2008 1:26 pm
by JAB Creations
The issue is not the client but the server code. You need to always check for the member $_SESSION for all member-only functionality at the server.

So in essence the logic is...

if (logged in) {do stuff}
else {throw an error message}

Re: Browser back button

Posted: Mon Jul 21, 2008 1:46 pm
by RobertGonzalez
And for the record, please do not mention that your issue if urgent. All of the posts here are urgent. Telling us yours is urgent is not going to make anyone want to help you any faster.