<?php
$mysqli = new mysqli("localhost", "root", "", "voorraad");
$result = $mysqli->query("SELECT leverancier from leverancier");
echo "<select id='leverancier' name='leverancier' style='width: 30%', color='black'>";
while ($row = mysqli_fetch_array($result)) {
echo "<option value='" . $row['leverancier'] ."'></option>";
}
echo "</select>";
?>
This is the code that I am using, the data is correctly loaded in the <select> menu, but the problem is that it is not visible. Here you can see the problem, the 20 records in the database are loaded, but not visible, I can select them, and save them in the database. But there are not visible.
echo "<option value='" . $row['leverancier'] ."'>" . $row['leverancier'] ."</option>";