$auth = 0;
if (($PHP_AUTH_USER == $admin ) && ($PHP_AUTH_PW == $pass ))
{
$auth = 1;
}
if ( $auth != 1 )
{
header('WWW-Authenticate: Basic realm="Authorization Required!"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required!';
exit;
}
Ok, I got it off of phpfreaks. It had some errors that I already fixed. Now, when I use it, if I put in the pass and user name, it still brings up the prompt again, and does not execute the script. I can tell that it's out of order, but I don't know how to arrange it.