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? Quote Link to comment 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. Quote Link to comment 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?? Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.