Good afternoon. I have a problem with a select
to bring to list to choose the name of a worker from a table, but I read the guides and can not find the detail, because when testing it on the web, only the empty space appears, the part of the script
<li id="li_2" >
<label class="description" for="element_2">NOMBRE DEL ELEMENTO </label>
<div>
<select>
<?php
$mysqli=mysqli_connect("localhost", "root", "XXXX", "pcsdb")or
die("No se conecto al servidor");
if (!$conexion){ echo (mysqli_errno());
$consulta="SELECT id,nombre FROM personal ORDER BY id ASC";
$resultado=mysqli_query($mysqli, $consulta);
?>
<option value="">Seleccionar</option>
<?php
while($fila=mysqli_fetch_array($resultado)){
echo $fila['id'];
?>
<option value="<?php echo $fila['id'];?>"><?php echo$fila['nombre'];?></option>
<?php
}
?>
</select>
</div>
</li>
This is how it appears to me now when running in the browser
Thanks in advance