if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
<select id="nom" name="nom">
<option value="1"> .$row['nombre']. </option>
</select>
}
if ($result->num_rows > 0) {
while($row = $result->fetch_assoc()) {
<select id="nom" name="nom">
<option value="1"> .$row['nombre']. </option>
</select>
}
Be sure to place the code next time, it's easier.
I do not accept the impression of the select because the instructions
<select name="nom" id="nom">
<option value="1">.$row['nombre'].</option>
</select>
they are not php language, you must put everything on text in the following way
echo '<select id="nom" name="nom">';
while($row = $result->fetch_assoc()) {
echo "<option value=\"1\">{$row['nombre']}</option>";
}
echo '</select>';