manjumadhav93 Posted September 23, 2014 Share Posted September 23, 2014 Hi experts,I have the following problem.I have a file login.php which is used to allow users to log in.When the form is submitted it is redirected to checkuserlogin.php.If the credentials are right he is redirected to main.php.But in main.php if the user clicks back browser button,he is redirected to login.php and in login.php if he presses forward button,he is redirected to main.php.Can any one tell he how to make sure the application is not redirected to main.php when user presses forward button and how to make sure the application is not redirected to login.php when user presses back button. Quote Link to comment https://forums.phpfreaks.com/topic/291232-login-issue-in-php/ Share on other sites More sharing options...
Jacques1 Posted September 23, 2014 Share Posted September 23, 2014 You cannot prevent people from going back to login.php, because that's simply where they come from. What you can do, however, is redirect them back to main.php if they're already logged in. Quote Link to comment https://forums.phpfreaks.com/topic/291232-login-issue-in-php/#findComment-1491867 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.