just upload it to the top of the page that you want to protect, this page MUST be saved as .php
and just so no one else pm's me saying they don't know the password or username Code has been updated and change everything that says CHANGEME. ;)
<?
$infotext ="Registered "; // The text that's displayed in the logon window
$loginname ="CHANGEME"; // The login name for the secured page
$password ="CHANGEME"; // The password for the secured page
if ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $loginname) && ( $PHP_AUTH_PW == "$password" )) ) {
header("WWW-Authenticate: Basic entrer=$infotext");
header("HTTP/1.0 401 Unauthorized");
error("Access Denied");
}
?>