Page 1 of 1

Require login to view secure pages

Posted: Sat Feb 04, 2006 12:20 pm
by wbryan6
I have an administrative portion of my site where I can login to add and delete information from my database, but the problem is that if someone were to just type the secure url they would be admitted to the page. How do I make this secure and require that the person login before they can view certain pages? Thanks.

Posted: Sat Feb 04, 2006 12:40 pm
by josh
When you log in you need to start a php session

read: http://www.php.net/sessions


Check for the existance of a valid session on each page you want to protect


This has been discussed in great lengths on these boards before so try a search if you get stuck