Why does the following code work in ie but not firefox
$result = mysql_query("SELECT * FROM `vecpix_passwords` WHERE `Password` = '$pass'");
if (!$result) {
$r = 'Invalid query: ' . mysql_error();
}else{
$count = mysql_num_rows($result);
if($count == 1){
$_SESSION['passvp'] = 'Yes';
$r = 'Password found...';
}else{
$_SESSION['notpassvp'] = 'No';
$r = 'Password not found...'.mysql_num_rows($result);
}
}
Well seems to have been fixed by changing the code
if($count == 1){
to
if($count > 0){
still dont understand how two browsers can give a different answer for something processed server side
$result = mysql_query("SELECT * FROM `vecpix_passwords` WHERE `Password` = '$pass'");
if (!$result) {
$r = 'Invalid query: ' . mysql_error();
}else{
$count = mysql_num_rows($result);
if($count == 1){
$_SESSION['passvp'] = 'Yes';
$r = 'Password found...';
}else{
$_SESSION['notpassvp'] = 'No';
$r = 'Password not found...'.mysql_num_rows($result);
}
}
Well seems to have been fixed by changing the code
if($count == 1){
to
if($count > 0){
still dont understand how two browsers can give a different answer for something processed server side