title: PHP Mysqli HTML How to have current value from database selected in <select>
body: <p>my goal is get current value from database, selected in the dropdown list.
  I tried that code but it shows always "Ndone" in the dropdownlist </p>
  
  <pre><code>&lt;select name="work" id="work" value="&lt;?php echo $work; ?&gt;"&gt;
       &lt;option selected="selected" value=""&gt;&lt;/option&gt;
       &lt;option selected="selected" value="DONE"&gt;DONE&lt;/option&gt;
       &lt;option selected="selected" value="NDONE"&gt;NDONE&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Also this one and nothing just the first row that selected in the dropdownlist</p>
  
  <pre><code>&lt;select name="work" id="work" value="&lt;?php echo $work; ?&gt;"&gt;
       &lt;option value=""&gt;&lt;/option&gt;
       &lt;option value="DONE"&gt;DONE&lt;/option&gt;
       &lt;option value="NDONE"&gt;NDONE&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>I don't know what to do, any help please</p>
  
  <p>When i use a textfield it works, so there's no problem with the variable <code>$work</code></p>
  
  <pre><code>&lt;input type="text" name="work" value="&lt;?php echo $work; ?&gt;"/&gt;
  </code></pre>