title: selected value get from db into dropdown select box option using php mysql error
body: <p>I need to get selected value from db into select box. please, tell me how to do it. Here is the code. 
  Note: 'options' value depends on the category. </p>
  
  <pre><code>&lt;?php 
    $sql = "select * from mine where username = '$user' ";
    $res = mysql_query($sql);
    while($list = mysql_fetch_assoc($res)){
      $category = $list['category'];
      $username = $list['username'];
      $options = $list['options'];
  ?&gt;
  
  &lt;input type="text" name="category" value="&lt;?php echo '$category' ?&gt;" readonly="readonly" /&gt;
  &lt;select name="course"&gt;
     &lt;option value="0"&gt;Please Select Option&lt;/option&gt;
     &lt;option value="PHP"&gt;PHP&lt;/option&gt;
     &lt;option value="ASP"&gt;ASP&lt;/option&gt;
  &lt;/select&gt;
  
  &lt;?php 
    }
  ?&gt;
  </code></pre>