bladechob Posted September 25, 2006 Share Posted September 25, 2006 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? Link to comment https://forums.phpfreaks.com/topic/21966-if-search-page-returns-blank-load-page/ Share on other sites More sharing options...
trq Posted September 25, 2006 Share Posted September 25, 2006 [code=php:0]if (mysql_num_rows($result) == 0) { echo "Your query yielded no results";}[/code] Link to comment https://forums.phpfreaks.com/topic/21966-if-search-page-returns-blank-load-page/#findComment-98092 Share on other sites More sharing options...
bladechob Posted September 25, 2006 Author Share Posted September 25, 2006 Many thanks for that. I'll give it a go... Link to comment https://forums.phpfreaks.com/topic/21966-if-search-page-returns-blank-load-page/#findComment-98095 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.