How to populate HTML dropdown list with values from database
My guess is that you have a problem since you don’t close your select-tag after the loop. Consider separating your database-related code from the markup, it will help you to spot such mistakes easily <?php … // SQL part $sql = mysqli_query($connection, “SELECT username FROM users”); $data = $sql->fetch_all(MYSQLI_ASSOC); // HTML part ?> <tr> <td>Owner</td> … Read more