title: I have query in my code for search button
body: <p>I have 6 input fields in my search. I want to search data if user selects one or more input fields. 
  e.g. 1) If i select only city then result should be of that city.
  2) If i select city, area, Property type then result should be properties of that city according to the area and property type.  </p>
  
  <p>This is what I have tried:  </p>
  
  <pre><code>$strquery="SELECT * FROM sell_rent_prop_detl WHERE city like '%" .  
             $_POST['city'] . "%' and area &lt;= '" . $_POST['area'] . "'   
             and prop_type= '" . $_POST['ptype'] . "'   
             and bedroom= '" . $_POST['bedroom'] ."'";    
  
  $results=mysql_query($strquery);
  </code></pre>