Jump to content

Archived

This topic is now archived and is closed to further replies.

bladechob

If search page returns blank, load page

Recommended Posts

Hi, I'm new to all of this PHP stuff and need a hand please in trying to get a page to display if a search on my site comes back blank i.e. I am starting as villa rental site where you enter search criteria such as location, date range and property type, hit submit and it searches for availability in an sql database. At present if nothing is available on the dates chosen it kicks back to the search page. I need to get a page displayed for the viewer so that when the search returns blank it tells them why? Any ideas please?

Share this post


Link to post
Share on other sites
[code=php:0]
if (mysql_num_rows($result) == 0) {
  echo "Your query yielded no results";
}
[/code]

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.