totally confused as to why this wont work
platform - win2k mysql IIS
and all working fine no problems
I am trying to create a login system thru the php user authentication:
here is my code:
<?php
if(!isset ($PHP_AUTH_USER)) :
header('WWW-Authenticate: Basic realm="cit"');
header('HTTP/1.0 401 Unauthorized');
print "you need access 😛";
exit;
else:
$dbcnx = mysql_connect("192.168.1.27", "root", "");
if (!$dbcnx) {
echo( "<p>Unable to connect to the " . "database server please try again later.</p>" );
exit();
}
mysql_select_db("database1", $dbcnx);
if (! @mysql_select_db("database1") ) {
echo( "<p>Unable to locate the database1 " . "database at this time.</p>" );
exit();
}
$result = @("SELECT first_name, last_name
FROM users
WHERE first_name='$PHP_AUTH_USER' and last_name='$PHP_AUTH_PW'");
if (mysql_numrows($result) != 1):
header('WWW-Authenticate: Basic realm="cit"');
header('HTTP/1.0 401 Unauthorized');
exit;
else:
$userid = mysql_result (user_authenticate, 0, $result);
endif;
endif;
?>
any ideas
the box appears and i enter my user /pass BUT there is an extra box asking for domain and it just says not authorised no matter what user / pass i put in 😐