1
I’d like to ride a select
with database information using Mysqli, whereas the 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>
Fix: Select cod_usuario, name
– Joao Paulo
perfect had forgotten that
– Otto
I noticed. Thanks. I’m going to test now.
– fabricio_wm
Hi, @Joaopaulo . Nothing returned. You know what it can be?
– fabricio_wm
Sorry. It worked.
– fabricio_wm
then mark as solved and give a plus ai
– Otto