Script Category : PHP
Script Sub Category : User Authentication
This is a simple authentication example that uses the HEADER function to force users to authenticate themselves. It works only if PHP is installed as an Apache module. Instead of simply printing out the $PHP_AUTH_USER and $PHP_AUTH_PW, you would probably want to check the username and password for validity. Perhaps by sending a query to a database, or by looking up the user in a dbm file.
|