Does anybody know why this doesn't work:
<?php
$LOGIN = "admin";
$PASSWORD = "test";
function error ($error_message)
{
echo $error_message."<BR>";
exit;
}
IF ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW == "$PASSWORD" )) )
{
header(" Basic entrer=\"Form2txt admin\""
;
header("HTTP/1.0 401 Unauthorized"
;
error("Unauthorized access..."
;
}
ELSE
{
print"<HTML>";
print "<HEAD>";
print "<TITLE>Protected</TITLE>";
print "</HEAD>";
print "<BODY>";
print "test";
print "</BODY>";
print"</HTML>";
}
?>
It just keeps giving the unauthorized access messages.
And is this a secure login for as far as secure goes without a database login.
Thanks in advance.
Roberti.
<?php
$LOGIN = "admin";
$PASSWORD = "test";
function error ($error_message)
{
echo $error_message."<BR>";
exit;
}
IF ( (!isset($PHP_AUTH_USER)) || ! (($PHP_AUTH_USER == $LOGIN) && ( $PHP_AUTH_PW == "$PASSWORD" )) )
{
header(" Basic entrer=\"Form2txt admin\""

header("HTTP/1.0 401 Unauthorized"

error("Unauthorized access..."

}
ELSE
{
print"<HTML>";
print "<HEAD>";
print "<TITLE>Protected</TITLE>";
print "</HEAD>";
print "<BODY>";
print "test";
print "</BODY>";
print"</HTML>";
}
?>
It just keeps giving the unauthorized access messages.
And is this a secure login for as far as secure goes without a database login.
Thanks in advance.
Roberti.