I have just received a strange complaint about our new website. We are using MySQL with PHP authentication for logons. I use the following select statement and rowcount variable:
<?
function authenticate() {
Header( “WWW-authenticate: basic realm=”blahblahblah””);
Header( “HTTP/1.0 401 Unauthorized”);
echo “You must enter a valid username and password to access this resourcen”;
exit;
}
if(!isset($_SERVER[“PHP_AUTH_USER”])) { authenticate(); }
else {
$AuthUser = $
$Result = mysql_db_query(“alpha”, “SELECT name FROM users WHERE username=’$AuthUser’ and password=’$AuthPass'”) or die (mysql_error());
$num = mysql_numrows($Result);
if($num == 1) { }
if($num == 0) { authenticate(); }
}
?>
It works fine using every browser I can find to use IE5/Net5 or newer, except for IE5 with service pack 2 installed. Is this a known problem? I don’t get an error message or debug error, it just doesn’t recognize that it is logged in or isn’t logging in at all.
Please help