Hi,
I'm trying to use an authentication method I found in a tutorial in the
net. The server prompts for username/password. But if I enter the hard coded
values (or any other values) the server rejects them with a message
authorization failed.
I use PHP 4 as a module on IIS
Thanks very much for any help,
here is the program I got from the tutorial.
<?php
if ( ( !isset( $PHP_AUTH_USER )) || (!isset($PHP_AUTH_PW))
|| ( $PHP_AUTH_USER != 'user' ) || ( $PHP_AUTH_PW != 'open' ) )
header( 'WWW-Authenticate: Basic realm="Private"' );
header( 'HTTP/1.0 401 Unauthorized' );
echo 'Authorization Required.';
exit;
} else
echo 'Success!';
}
?>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]