I am trying to fetch values from my database and display the selected value in a dropdown list with other values. I have seen many questions here regarding this issue but none of them is working. Please Help!
<select name= "indication_name" id= "update_indication_id" class="form-control" required>
<?php
$sql = "SELECT id,description From indications";
$result=mysqli_query($con,$sql);
while($row=mysqli_fetch_array($result)){
echo "<option selected='selected'>" . $row['id']." - ". $row['description'];
}
?>
</select>