PHP:无法将从数据库中检索到的值显示到分配了php变量的下拉列表中

I have a dropdown in a form, which has got a variable which contains values from database.

<b>Assignee: &nbsp &nbsp &nbsp &nbsp </b><select name = "assignee" id="assignee" value = <?php echo $dropdown ?></select> &nbsp &nbsp  &nbsp &nbsp  &nbsp &nbsp 

so Assignee dropdown will be populated from database, for which the values are stored in $dropdown.

Now after i submit the form. There is an edit button. So when user clicks the button. The form should populate the same value which has been used for submission. But currently its populating the default values.

The correct syntax for a html select dropdown is as following

<select name="form_name">
    <option value="test">foo</option>
    <option value="tests" selected>sfoo</option>
</select>

Try this:

   include('configdb.php');
   $query = "SELECT username FROM users";
   $result = mysqli_query($mysqli,$query) or die(mysqli_error($mysqli));
   $dropdown = '
';
   while($row = mysqli_fetch_assoc($result)) {
      $dropdown .= "<option width='200' value='".$row['username']."'>".$row['username']."/option>";
   }
   $dropdown .= "
";
  <b>Assignee:</b>
  <select name = "assignee" id="assignee"><?php echo $dropdown; ?></select>