hi everyone...is there something wrong with these line
$query = mysql_query("SELECT emaildb, passworddb, fnamedb, lnamedb, statdb FROM $table WHERE emaildb = '$loginEmaildata'");
$row = mysql_fetch_row($query);
if(mysql_num_rows($query)==1)
{
if($loginPassworddata==$row[2]){
return "statsNum=" . $row[4];
}else{
return "statsNum=invalid";
}
} else{
return "statsNum=error";
}
coz if ill omit some lines and change it to these...
$query = mysql_query("SELECT emaildb, passworddb, fnamedb, lnamedb, statdb FROM $table WHERE emaildb = '$loginEmaildata'");
$row = mysql_fetch_row($query);
if(mysql_num_rows($query)==1)
{
return "statsNum=" . $row[2];
} else{
return "statsNum=error";
}
... it works...my problem actually is that as soon as the comparison of the login username exist in the database, i want the script to compare its password whether it matches or not. coz if ever it doesnt it will give a different error other than the "error" word that i have for login details that doesnt exist in the database
thanks in advance!