Zend - The PHP Company




Code Gallery: kliver


Protecting whole directories with MySQL  

Type: code fragment
Added by: kliver
Entered: 16/07/2004
Last modified: 07/12/2003
Rating: - (fewer than 3 votes)
Views: 5012
Problem: PHP authentication doesn't protect whole directories, HTTP authentication isn't automated (you always have those inflexible txt files) Solution: Using this script lets you update your .htpasswd file taking usernames and passwords from a MySQL source Just execute this script everytime a password/username combination is newly entered or changed. It's maybe not the "perfect" way, but the only way I found to protect whole directories with MySQL data.




Search