new to php mysql
When a database query returns no results, what is the best way to use php to redirect to another page or to display "nothing found" instead of the results?
cauri
[/google]
conditional user feedback
Moderator: General Moderators
Code: Select all
$res=mysql_query("SELECT something FROM something_else");
if(mysql_num_rows($res)<1)
echo "<span style='color: red; text-align:center'>Sorry, nothing found ;(</span>";
else {
//display your results here
}