I have a register.php
page, which allows visitors to register to become certain users. If they meet all requirements set by the form validation, they will be redirect to another page, called thankyou.php
page.
My question is if anyone tries to visit the thankyou.php
page directly without going through/ from the register.php
page, then it should redirect them back to the register.php
page again.
Note: I know how to use the $_session = array();
for the logged-in users, and header()
function very well. Once again, the question here requires some kind of research on how to restrict visitors from accessing thankyou.php
directly (because visitors have not become users of the website yet).
Please don't guide me in jquery or javascript or any other languages. I need your help in php.
Thank you!