title: How to combine several dropdown list values in mysql query?
body: <pre><code>   &lt;form method="post" action="search.php"&gt;
        &lt;select name="Num[]"&gt;
          &lt;option value=""&gt;Select One&lt;/option&gt;
          &lt;option value="numofpeople"&gt;Number of people&lt;/option&gt;
        &lt;/select&gt;
        &lt;select name="op[]"&gt;
          &lt;option value=""&gt;Select One&lt;/option&gt;
          &lt;option value="&gt;4"&gt;&gt;4&lt;/option&gt;
          &lt;option value="&gt;2"&gt;&gt;2&lt;/option&gt;
  
        &lt;/select&gt;
  
        &lt;br /&gt;
  
  
        &lt;select name="num2[]"&gt;
          &lt;option value=""&gt;Select One&lt;/option&gt;
          &lt;option value="price"&gt;Price&lt;/option&gt;
        &lt;/select&gt;
        &lt;select name="op2[]"&gt;
          &lt;option value=""&gt;Select One&lt;/option&gt;
          &lt;option value="&lt;20000"&gt;&lt;20000&lt;/option&gt;
          &lt;option value="&lt;40000"&gt;&lt;40000&lt;/option&gt;
        &lt;/select&gt;
        &lt;br /&gt;
  
        &lt;div class="input-group-btn"&gt;
          &lt;button class="btn btn-default" type="submit"&gt;&lt;i class="glyphicon glyphicon-search"&gt;&lt;/i&gt;&lt;/button&gt;
        &lt;/div&gt;
  
      &lt;/form&gt;
  </code></pre>
  
  <p>Here is my code to provide a dropdown list for the user. It will act as a filter to generate more specific result through mysql and don't get the logic to combine these dropdown values. </p>
  
  <p>I would like to have something like:</p>
  
  <pre><code>Select * from hotel where price &lt; 40000;
  </code></pre>
  
  <p>and I will provide all keywords after "Where".</p>