I'm have created a login system and all but it's gonna seem pointless if you can't do anything special. What I'm going to do is block some of the pages for non-members. How do I do that?:confused:
Printable View
I'm have created a login system and all but it's gonna seem pointless if you can't do anything special. What I'm going to do is block some of the pages for non-members. How do I do that?:confused:
I don't think you technically block pages using PHP.
Based upon whether the session is active or not, you display something different to the screen.
Once you have checked the users password and ID you can set a session variable containing the user ID. You can then put a piece of code at the top of each page to check the variable exists, if it does not redirect to the login page.