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? Quote Link to comment 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] Quote Link to comment 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... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.