I would like to mount a select
with database information using Mysqli , where value
will receive information from my cod_usuario
and the information that will be displayed is the column nome
.
<select>
<option name="nome_tecnico" value="
<?php
$query = $con->query("SELECT cod_usuario FROM pv_usuario where cod_cargo = 1 and ativo = 1");
while($reg = $query->fetch_array()) {
echo $reg["cod_usuario"];
}
?>
">
<?php
$query = $con->query("SELECT nome FROM pv_usuario where cod_cargo = 1 and ativo = 1");
while($reg = $query->fetch_array()) {
echo $reg["nome"];
}
?>
</option>
</select>