0

First of all I would like to let you know that I tried every other solution that I found here regarding to my topic.. But nothing worked for me!

As the title says I want to create a drop down list with data from a database!

The connection with the database is right so I don't show you the code! I have tried many ways, one is below.

The only thing that I am getting is a blank list.Thanks!

<select name="Anaktisi">
  <?php 

  $query2="select name from books WHERE sub_ID=1";
  $result2 = mysqli_query($con,$query2);

  while ($row2 = mysqli_fetch_array($result2)) { ?>
      <option value="<?php echo $row2['name'];?>"> </option>
  <?php } ?>

</select>
HDJEMAI
  • 9,436
  • 46
  • 67
  • 93

0 Answers0