How can one secure a directory using php authentication. Here's the current situation. I developed a membership database for an organization. My database has its own authentication to allow two tiers of access, members and non members and has individual passwords for every user.
Now the website that the database resides in has a password protected section (one login and password for everyone) using a .htaccess file protecting a set of files. Clearly, having a person log into the password protected section, and then log in again using my database authentication is not an elegant solution.
What can I do to incorporate my authentication system into the existing database without going in and inserting a session checking code for every single HTML file that needs to be protected (there are too many and maintenance becomes a headache). I am looking for a quick and elegant solution. Thanks for any help.