Jump to content

Recommended Posts

Good Day my friends. Please I need Help. I have a website that required registration, before user can be able to view the pages. Now the problem with my work is that if a user manage to forge the link in my webpage example google.com/user.html, it will be accessed where that page should only be seen by login user not vistor that forge the link or users that haven't logged in. So what i want is how to protect a webpage from being seen by guest, rather when they try to access the user page it should redirect them to the login page. That means everyone must login to see any page except the login. I was hoping i could get a php code or javascript or css or html code that will help do that. Someone please help me. Thanks in advance.

After successful login set a session var, maybe their username or just loggedin = true or something.  Then on each "protected" page check for that session var.  Give it a try and post some code.  Do you have the login coded already?

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.