title: Select multiple (PHP and MySQL)
body: <p>I have a form with a select multiple like this:</p>
  
  <pre><code>&lt;select name="states[]" size="5" multiple&gt;
      &lt;option value="2"&gt;state 1&lt;/option&gt;
      &lt;option value="3"&gt;state 2&lt;/option&gt;
      &lt;option value="4"&gt;state 3&lt;/option&gt;
      &lt;option value="5"&gt;state 4&lt;/option&gt;
      &lt;option value="6"&gt;state 5&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I want to have the possibility to choose more than one state, and then make the query to my database and show the description of each state chosen.</p>
  
  <p>So this is what I have to make the query using PHP and MySQL:</p>
  
  <pre><code>$state = $_POST['states'];
  $data = mysql_query("SELECT * from states WHERE id_state = '$state'",$db); 
  
  while($row = mysql_fetch_array($data)){
      $result=$row['description'];
  }
  
  echo $result;
  </code></pre>
  
  <p>I have that code and it doesn't show anything.</p>
  
  <p>How can I fix this problem?</p>