Authentication - can't see why it does not work
I got a naughty problem here. I have a password dialog script which should be working and looks very good. But even if I type the correct user/password it will not let me pass :(.
PHP Code:
<?php include ("./pass.php"); ?>
<?php
$User = "more";
$Pswd = "beer";
$Info = "got trouble? mail [email][email protected][/email]";
if (($PHP_AUTH_USER!=$User)||($PHP_AUTH_PW!=$Pswd)) {
Header('WWW-Authenticate: Basic realm="You need to authenticate"');
Header('HTTP/1.0 401 Unauthorized');
echo "<html>
<head>
<title>Error - Access Denied</title>
</head>
<h1>Access denied</h1>
<hr>
<em>$Info</em>";
exit;
}
?>
Do you have any idea why this is not working?
I use <?php include ("./pass.php"); ?> to call it.
Someone gave me the hint that the problem is that it is
getting recalled all the time.... maybe that's the problem?