Disable user to go back to the last page | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

Disable user to go back to the last page

I made a register system. After registration user will be directed to the registration complete page where there is link called "login" witch will direct them to the login. Once they are there they can just click the "back" arrow on their browser and get back to the "registerSuccessful" page. My question is... How to make them unable to go back to the page like that and only show them the page after registration?

10th May 2017, 3:41 PM
MM1132
MM1132 - avatar
2 Answers
+ 2
Use $_SESSION array to control it.
10th May 2017, 3:57 PM
Calviղ
Calviղ - avatar
+ 1
Thank you so much. In the end of registration I just create a new session veriable and in the register_success I can just control it and then destroy it :D
10th May 2017, 5:00 PM
MM1132
MM1132 - avatar