Pawan_Agarwal Posted August 7, 2014 Share Posted August 7, 2014 we have already see the facility in website gmail and facebook that when user log-in successfully then its redirects the page to another page automatically, can someone tell me how to redirect the page when log-in becomes successful ? User tries to Log-in -> create session variable -> now redirect the page I can verify user account details and set the session variable at the same time, but how to reload the page so that it finds the session and reload itself and then redirect the page to new page ?? Thanks for sparing your time here !! Quote Link to comment https://forums.phpfreaks.com/topic/290330-how-to-re-direct-page-when-login-becomes-successful/ Share on other sites More sharing options...
requinix Posted August 7, 2014 Share Posted August 7, 2014 The function you want is header. Make sure you don't output anything before you use it. Quote Link to comment https://forums.phpfreaks.com/topic/290330-how-to-re-direct-page-when-login-becomes-successful/#findComment-1487107 Share on other sites More sharing options...
Aptugo Posted August 12, 2014 Share Posted August 12, 2014 header('Location: placetogo.php'); might come handy to you. Enjoy! Quote Link to comment https://forums.phpfreaks.com/topic/290330-how-to-re-direct-page-when-login-becomes-successful/#findComment-1487616 Share on other sites More sharing options...
Jacques1 Posted August 12, 2014 Share Posted August 12, 2014 But don't forget the exit; afterwards. Quote Link to comment https://forums.phpfreaks.com/topic/290330-how-to-re-direct-page-when-login-becomes-successful/#findComment-1487617 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.