title: PHP populate drop down list with SQL data
body: <p>I want to populate a drop down list with values from database.</p>
  
  <pre><code>&lt;?php
  require 'conn.php';
  
  $filter=mysql_query("select distinct fuel_type from car");
  while($row = mysql_fetch_array($filter)) {
  $options ="&lt;option&gt;" . $row['fuel_type'] . "&lt;/option&gt;";
  
  $menu="&lt;form id='filter' name='filter' method='post' action=''&gt;
    &lt;p&gt;&lt;label&gt;Filter&lt;/label&gt;&lt;/p&gt;
      &lt;select name='filter' id='filter'&gt;
        " . $options . "
      &lt;/select&gt;
  &lt;/form&gt;";
  
  echo $menu;
  }
  ?&gt;
  </code></pre>
  
  <p>The issue is that I get two lists instead of one list with the values inside. Please advise</p>
  
  <p><img src="https://i.stack.imgur.com/CQSSl.png" alt="drop down list"></p>