How to ensure that a page can only be viewed when called from another page
-
Hi,
I need to ensure that a particular page of my website can only be viewed when called from another page.
I have a quiz (using a WP plugin) that ends with either a success or a failure page, depending on the user’s answers to the quiz questions. The success page takes the user to the next stage of the competition. It is essential that the user can only get to that page by answering the quiz questions correctly and can only get to that page once – i.e. I don’t want the user to be able to make a note of the success page’s URL and access it directly.
I suspect I need to make use of some sort of variable that is set prior to the call to the success-page and validated by the success-page template.
What would be the best practice for this? Should I set a system variable? global variable? some other technique?
Would be very grateful for any advice.
Thanks.
- The topic ‘How to ensure that a page can only be viewed when called from another page’ is closed to new replies.