title: Multiple search value using dropdown list in PHP and MySQL
body: <p><strong>Html Form:</strong></p>
  
  <pre><code>&lt;form&gt;
      &lt;select name="country[]" id="country" multiple&gt;
          &lt;option value="any"&gt;any&lt;/option&gt;
          &lt;option value="India"&gt;India&lt;/option&gt;
          &lt;option value="Canada"&gt;Canada&lt;/option&gt;
          &lt;option value="UK"&gt;UK&lt;/option&gt;
          &lt;option value="USA"&gt;USA&lt;/option&gt;
          &lt;option value="Australia"&gt;Australia&lt;/option&gt;
      &lt;/select&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p><strong>PHP Code</strong></p>
  
  <pre><code>&lt;?php
  $country = $_REQUEST['country'];
  if($country=="")
      $countrysql = "";
  else
  {
      if($country == "Any") $countrysql = "";
      else
      {
          $country = str_replace(",","','",$country);
          $countrysql = " and Country in ('$country')";
      }
  }
  $queryString = "SELECT * FROM register where $countrysql";
  ?&gt;
  </code></pre>
  
  <p>I have created a form in PHP and I want to search multiple options. I already created table Register and a column Country. I am getting the result If I give single value. If I give multiple I am not getting the result. Please help.</p>