Forum Moderators: coopster
$num_rows = mysql_num_rows($result);
if ($num_rows == 0){
header(error.php ) /// redirect to error message
}
however this does not seem to work. BUT! when i do this
$num_rows = mysql_num_rows($result);
if ($num_rows > 0){
header(error.php ) /// redirect to error message
}
then it works but for the wrong reason. i need it to redirect to the error message if their is no result e.g. no rows displayed.
what am i doing wrong?
Thanx in advance.