title: dynamic dropdown list-get values from mysql
body: <p>i have this code.it is a dropdown list and a submit button.
  I have a query  "SELECT * DISTINCT column_name FROM table_name" that has result 15 values</p>
  
  <p>Now,i want to take those values of the query and dynamicly enter them on the option=..... field.Also the "NAME" section must be the same as values.
  example: IF value1="abcd"</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;option value="abcd" &gt;abcd&lt;/option&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;form  method="post" target=".....php"&gt;
  &lt;select name="exa" &gt;
      &lt;option value="value1" &gt;NAME 1&lt;/option&gt;
      &lt;option value="value2" &gt;NAME 2&lt;/option&gt;
      &lt;option value="value3" &gt;NAME 3&lt;/option&gt;
   &lt;option value="value4" &gt;NAME 4&lt;/option&gt;
      &lt;option value="value5" &gt;NAME 5&lt;/option&gt;
      &lt;option value="value6" &gt;NAME 6&lt;/option&gt;
   &lt;option value="value7" &gt;NAME 7&lt;/option&gt;
      &lt;option value="value8" &gt;NAME 8&lt;/option&gt;
      &lt;option value="value9" &gt; NAME 9&lt;/option&gt;
   &lt;option value="value10" &gt;NAME 10&lt;/option&gt;
      &lt;option value="value11" &gt;NAME 11&lt;/option&gt;
      &lt;option value="value12" &gt;NAME 12&lt;/option&gt;
   &lt;option value="value13" &gt;NAME 13&lt;/option&gt;
      &lt;option value="value14" &gt;NAME 14&lt;/option&gt;
      &lt;option value="value15" &gt;NAME 15&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;form action=$value&gt;
  &lt;input type="submit" value="GO!"  /&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>i've made this but didnt work</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;body&gt;
  &lt;form  method="post"  &gt;
  &lt;select name="exa" &gt;
  &lt;?php
   include_once "LOGIN TO DB SCRIPT";
   $query_ak='SELECT DISTINCT (column_name) FROM table_name';
   $result = mysql_query ($query_ak) or die (mysql_error);
   
      while ($row =  mysql_fetch_assoc($result)) {
       }
   ?&gt;
   &lt;option value = $row['ak_ex']&gt; "$row['ak_ex']"&lt;/option&gt;
   
  &lt;input type="submit" value="GO!"  name="go"/&gt;
  &lt;/select&gt;
  &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;</code></pre>
  </div>
  </div>
  </p>