I'm having a bit of struggle putting together a selection list in HTML where the options or values are being retrieved from a table in the database. I get the following result:
As you can see this is not my intention, I rather have all options in 1 Selection List, with multiple options clickable.
This is my HTML Code (Bootstrap Framework):
<div class="container-fluid well well-lg">
<?php while ($itemsrow = $query->fetch()) : ?>
<div class="form-group">
<label for="sel1">Select list:</label>
<select class="form-control" id="sel1">
<option><?php echo $itemsrow['Beschrijving']; ?></option>
The PHP Logic:
$conn = Db::getInstance();
$query = $conn->prepare("SELECT * FROM items WHERE user_id = $userID");
$query->execute();
Thanks in advance!