I have a page on a property page with two search functions. I want both searches to display results on the same page.
Search1 searches for a country Search2 search for county, city, bedrooms, min and max.
Search 2 works fine using:
$country_code = $_GET["intsearch"];
$bedrooms = $_GET["bedrooms"];
$min = $_GET["min"];
$max = $_GET["max"];
$cityCode = $_GET["city"];
$query_featured = sprintf("SELECT propertyID, bathrooms, bedrooms, mainimage, name, prices, pricePrefix, propertyType, regionCode, `currency`, country_code, cityCode FROM properties WHERE country_code = '$country_code' AND cityCode = '$cityCode' AND bedrooms='$bedrooms' AND prices BETWEEN '$min' AND '$max' ORDER BY prices ASC", GetSQLValueString($colname_featured, "text"));
But search1 one does not work because it's only sending a country_code variable and because my query is looking for bedrooms and price nothing shows.
How can I have this so when a search is submitted with Search1 one all properties in the selected country display regardless of bedrooms and price?
I can send over bedrooms, city_code, min, max in the URL with a value of '0' but i'm not sure how I would make it so '0' means show all results.
Hope this makes sense?