PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?php
if ((!isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))) {
header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;
} else {
echo "You entered $PHP_AUTH_USER for a username.<BR>";
echo "You entered $PHP_AUTH_PW for a password.<BR>";
}
?>
now if i hit cancel it says 'Authorization Required' but if I hit 'OK' then it just asks for my username and password again even though i entered stuff in the fields! why? how? who? help?