I have created a membership system and only signed in users can enter comments. But, without signing in, everyone can access every pages by typing the name of the PHP file in the link bar.How can i redirect non-registered users to the homepage?
Thanks
I have created a membership system and only signed in users can enter comments.
Share
You have to create a session if a user has succesfully logged in:
And in the php file where you want to check: