I have an authentication system. below is my code:
function checkSignIn($myEmail, $myPassword) {
$check = "select name from person where email = '$myEmail' AND password = password('$myPassword')";
$result = mysql_query($check);
if(!mysql_num_rows($result)) return 0;
else {
$query_data = mysql_fetch_row($result);
return $query_data[0];
}
}
...bla bla here...
session_register("myEmail", "myPassword");
$myName = checkSignIn($myEmail, $myPassword);
session_register("myName");
if(!$myName) {
session_unregister("myEmail");
session_unregister("myPassword");
session_unregister("myName");
echo "$myName and fail";
} Else {
echo ("welcome $myName");
}
I am testing on my IIS5, localhost. It works perfectly, nothing wrong at all. However, when signing in with Netscape, it takes a while for it to response.
First I thought there was a problem with querying my table or the database structure that made it slow. In fact, it's not because when just query like "select * from..."
It's also fast in Netscape. Just the sign in process that is slow. By the way, i have tested with NS 4.76 and 4.78.
Please advice,
mick