query($sql); If ($city=='All'){ $url = 'http://widget.proxiopro.com/CRMLS/PropertyResult.aspx?id=0&AgentID=0&OfficeID=&CountryId=1&RegionId=CA&RegionName=California&CityId=-1&CityName=&PostCode=&CurrencyId=490&GarageCount=-1&BedRoomCount=-1&BathRoomCount=-1&MinPrice=0&MaxPrice=0&YearBuilt=0&YearBuiltTo=0&PriceOption=down&ClassId=-1&LivingAreaFrom=0&LivingAreaTo=0&LandAreaFrom=0&LandAreaTo=0&AreaUnit=1&lng=en-US&AGENT=&OFFICE=#page1'; }else{ //process input string if (is_null($_GET['bedrooms'])){ $bedrooms = 0; }else{ $bedrooms = $_GET['bedrooms']; } if (is_null($_GET['bathrooms'])){ $bathrooms = 0; }else{ $bathrooms = $_GET['bathrooms']; } if (is_null($_GET['priceMin'])){ $priceMin = 0; }else{ $priceMin = $_GET['priceMin']; } if (is_null($_GET['sqft'])){ $sqft = 0; }else{ $sqft = $_GET['sqft']; } if (is_null($_GET['bedrooms'])){ $bedrooms = 0; }else{ $bedrooms = $_GET['bedrooms']; } $url = "http://widget.proxiopro.com/CRMLS/PropertyResult.aspx?id=0&AgentID=0&OfficeID=&CountryId=1&RegionId=CA&RegionName=California&CityId=".$_GET['city']."&CityName=".$_GET['city']."&PostCode=&CurrencyId=490&GarageCount=-1&BedRoomCount=".$bedrooms."&BathRoomCount=".$bathrooms."&MinPrice=".$priceMin."&MaxPrice=1000000000&YearBuilt=0&YearBuiltTo=0&PriceOption=up&ClassId=1&LivingAreaFrom=".$sqft."&LivingAreaTo=1000000&LandAreaFrom=0&LandAreaTo=0&AreaUnit=1&lng=en-US&AGENT=&OFFICE=#page1"; } ?>