Thanks for your help. I understood the concept, but while doing the script I fail. Lack of PHP knowledge :mad:
However I identified the region where it happens.
<?php
if($result != "NULL") {
while($rec = mysql_fetch_assoc($result)){
$star = $rec['rating'];
$pid = $rec['id'];
$hname = $rec['name'];
$hloc = $rec['location'];
?>
After $hloc = $rec['location'];, I added
if(mysql_fetch_assoc($result) == 0)
{
echo "No match found for your query";
}
But this didn't echo "No match..." for empty results.
Should it be mysql_fetch_assoc or something else? Again, is it ($result) or $rec?
Sorry for being dump.