SELECT statement in Netscape vs. IE

wxdqz

New Member
I have a simple function to check user's userid/password/student_id (yes, three). The script is used in grade (a college course) checking.

..login script (login.shtml) has form processing userid/password/studentid..

It passes the vale to the function below...

=========
function authenticateuser($userid, $pswd, $stuid) {
global $DB_SERVER, $HTTP_HOST, $DB_LOGIN, $DB_PASSWORD, $DB, $DOCROOT ;

//open a persistent connection
if (!($link = mysql_pconnect ($DB_SERVER, $DB_LOGIN, $DB_PASSWORD))) {
displayerrmsg(sprintf("internal error %d: %s \n", mysql_errno(), mysql_error()));
return 0;
}

//Do the user/password check
$result=mysql_db_query("$DB", "select * from tbl_student WHERE userid='{$userid}' AND pswd='{$pswd}' AND student_id='{$stuid}';");

if ((!mysql_fetch_row($result))) {
header("Location:http://$HTTP_HOST/$DOCROOT/error1.shtml");
exit();
} else {
return 1;
}

======

With the "return 1", another script (grade_inquiry.php) generates a web page (result.shtml) with scores and grade of a particular user.

The problem is that with IE, it works fine (not a problem). But, with Netscape, it says there is no record found (error1.shtml).

Interestingly (at least for me), there is a link in the error1.shtml file which leads to the login script. If I click it and go there and re-enter the same userid/password/studentid, it works....

Any help would be greately appreciated!!! THANKS.
 
Back
Top