BrainSmasher Posted December 7, 2006 Share Posted December 7, 2006 What is the best way to secure some pages so they need a login to see them.Using cookies, sessions, the folder protecting of host itself or maybe someting else.Only 2 users account should be able to acces them so there arent alot of users.Thanx in advance Link to comment Share on other sites More sharing options...
justsomeguy Posted December 7, 2006 Share Posted December 7, 2006 I prefer sessions, the are quick and easy. Secure if PHP is set to use session cookies only (no session ID in the URL), which it is by default. If there are only 2 users, you can just hard-code the passwords in the file. Link to comment Share on other sites More sharing options...
BrainSmasher Posted December 7, 2006 Author Share Posted December 7, 2006 Ok ty i will start with it tomorrow.If i have anymore questions about it ill let you guys know Link to comment Share on other sites More sharing options...
BrainSmasher Posted December 8, 2006 Author Share Posted December 8, 2006 Back again after searching alot on the internet.I only found tuturials about about the session functions but i actually dont understand how to build up a session with cookies. Maybe some examples or a tuturial for building session security.Thanks in advance Link to comment Share on other sites More sharing options...
BrainSmasher Posted December 10, 2006 Author Share Posted December 10, 2006 Anyone please? Link to comment Share on other sites More sharing options...
MrAdam Posted December 10, 2006 Share Posted December 10, 2006 $_SESSION['status'] = 'member';if ($_SESSION['status'] == 'admin') { .. member's an admin ..} else { .. member's not an admin ..} ... for example Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now