November 13th, 2000, 05:04 AM
How could I make the htpasswd -password file
a MySQL table instead?
November 20th, 2000, 04:36 PM
Well, you could use $PHP_AUTH_USER and $PHP_AUTH_PW.
A detailed description of how it's done can be found on webmonkey.com. Look for PHP and Authorization.
It'll also go into detail on cookies and sessions and how to pull the data from a sql database.
However I have not yet figured how to protect directories behind your password protection. For example: www.domain.com/stuff/ is password protected, but if you go into www.domain.com/stuff/more more is not. I think you really have to work with sessions, hide all directories you are working in and check if the user was authorized on every maybe. Maybe through an included header.
If anyone has a better solution, post it.
November 20th, 2000, 10:06 PM