Code appears even with database records
The following code keeps showing even though there are records in my database and I don't understand why. Am I missing something? I'm not sure if this makes sense, but help would be great. :)
if($numrows==0)
{
echo"<h3>Results</h3>";
echo"<p>Sorry, your search: "".$escaped."" returned zero results</p>";
}
0
a source to share
3 answers
If the code you are having the problem with is the same as the one in the previous question ... then the problem is here:
$numresults=mysql_query($query);
$numrows=mysql_num_rows(numresults);
You are missing $ to multiple results on the second line.
+5
a source to share