alexinjamestown Posted February 9, 2008 Share Posted February 9, 2008 I'm new at this, but I have created a register script that automatically emails you the activate link, and then on the index page you have the choice to logout, forget password, and a link to my database. My question is how do I protect the database because once you register and login, you see the link so if you open the link independently you could go to it without logging in. Do I password protect certain directories on the site? Is there a script to add in an includes folder where I have my database connection and css scripts? Link to comment https://forums.phpfreaks.com/topic/90249-password-protect-pages/ Share on other sites More sharing options...
revraz Posted February 9, 2008 Share Posted February 9, 2008 Use sessions, and make sure they are authorized to view any page you want protected. Link to comment https://forums.phpfreaks.com/topic/90249-password-protect-pages/#findComment-462710 Share on other sites More sharing options...
alexinjamestown Posted February 9, 2008 Author Share Posted February 9, 2008 Ok, I'll give that a go, but if they're not registered then I'll need to be able to point them to a registrar so I guess I should copy and paste these files into every directory?? Link to comment https://forums.phpfreaks.com/topic/90249-password-protect-pages/#findComment-462739 Share on other sites More sharing options...
Daniel0 Posted February 9, 2008 Share Posted February 9, 2008 If they are not logged in while trying to access a restricted resource then just redirect them to the login page or give them a message and a link to the login page. Link to comment https://forums.phpfreaks.com/topic/90249-password-protect-pages/#findComment-462765 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.