Failed to fetch data for display in dropdwon on dynamic form

16 Views Asked by At

I made a dynamic form, there is a dropdown that retrieves data based on the mysql database, in the first part the data appears but when the form is added the data on the dropdwon doesn't appear.

enter image description here

<select name="nama[]" id="editable-select1" class="form-control" placeholder="Nama Lengkap">
 <?php
  while($row = mysqli_fetch_array($query)){
  echo '<option value="'.$row["nama"].'">'.$row["nama"].'</option>';
  }
 ?>
</select>

I want to make every time the form is added, the dropdown will still display data according to the database

1

There are 1 best solutions below

0
Friday On

Please provide more information and possible more code to be able to replicate your problem and find a solution, the question is too short and the code provided is not enough.