How do I get my webpage not to go back when they hit the back button and are log
ID: 651470 • Letter: H
Question
How do I get my webpage not to go back when they hit the back button and are logged out ?
how can I add a web page to be blocked like FACEBOOK doesn't let you get into their site with out having a page or a account with them, and if you try to put something in the url and try to go to something on their site it gives you a web page that says "you have to be logged in first" ?
I mean I don't want someone going to the url of the "index" page before they have signed up as a member they need to make an account first then they can have access to the "index" page. How do I do this gateway?
Consider I have a website so far that has a database and the website has 5 pages so far and two of them which is the login and sign up page which are both used with php and mysql and they work fine.
How do I restrict access to the main website by first having the users sign up with me for an account?
Explanation / Answer
You need to add session in every page of the website in the start of the page and also a condition in login and sign up page that if a person is logged in with session than that would be redirect to inner pages and vice versa.
You also have another option to use MVC like structure having only single point of entry with session file together.
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.