hi all,
this is the simple script , i am trying to execute.
But i am getting problem, whatever i type ,i get only authorisation
required .But it should get the username password i typed.
i am using PHP Version 4.2.2 .i think ,i am not getting the variable values
$PHP_AUTH_USER
$PHP_AUTH_PW
what might be the problem
please help me.
thanks in advance
urs
venkatraman
Program::
<?php
// File Name: auth01.php
// Check to see if $PHP_AUTH_USER already contains info
if (!isset($PHP_AUTH_USER)) {
// If empty, send header causing dialog box to appear
header('WWW-Authenticate: Basic realm="My Private Stuff"');
header('HTTP/1.0 401 Unauthorized');
echo 'Authorization Required.';
exit;
}
// If not empty, display values for variables
else {
echo "
<P>You have entered this username: $PHP_AUTH_USER<br>
You have entered this password: $PHP_AUTH_PW<br>
The authorization type is: $PHP_AUTH_TYPE</p>
";
}
?>