I'm using this forum a lot - but I guess that's what it is here for :-D
I've looked at the examples in the manual, examples from forums and examples from downlaoded source code.
But no matter what I do, it dose not work. Have tried several different scripts. This I guess is the most basic one, and I don't think I have any syntax faults... none that I can see.
<?
if(!isset($PHP_AUTH_USER))
{
header('WWW-Authenticate: Basic realm="Spoono Password."');
header('HTTP/1.0 401 Unauthorized');
exit;
}
else if(($PHP_AUTH_USER=="Fuu") && ($PHP_AUTH_PW=="bar"))
{
echo "Correct usr name and psw";
}
else
{
echo "<html><body bgcolor=ffffcc>Incorrect login!";
}
?>
I get the follwing error message:
Parse error: parse error, unexpected T_STRING in D:\Web\MrMustard\test.php on line 6
Line 6 is: header('HTTP/1.0 401 Unauthorized');_
And I don't see anything wrong there..... 😕