0
When selecting a user in my select I need to pass what I have selected to the fields of my form.. below this my method that picks up this information.
public function LerDadosUsu(){
try{
$lerusu = "SELECT * FROM usuario ";
$listusu = $this->con->Connect()->prepare($lerusu);
$listusu->execute();
$retDados = $listusu->fetchAll(PDO::FETCH_ASSOC);
return $retDados;
}
catch(PDOException $erro_2){
echo 'erro'.$erro_2->getMessage();
}
}
below I want to show all the user field data I selected in my form select
<div class="modal-body">
<form action="" method="post" name="frm_usuario">
<div class="form-group">
<label for="filter">Filtrar Usuário</label>
<div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span>
<select class="form-control" id="sel_usuario">
<!--INICIO DA PESQUISA DE DADOS COMBOBOX-->
<?php
$objeto = new Usuario();
$usuario = $objeto->LerDadosUsu();
foreach($usuario as $usuario):
?>
<option value=""> <?php print $usuario['nom_usujauport'] ?></option>
<?php
endforeach;
?>
</select>
<!--PESQUISA DADOS E RETORNA COMBOBOX-->
</div>
my question is how to pass the data I selected in the combobox to the input type = "text" of my fields below Name: Email: Password: Image:
Your question is a little difficult to understand, try to write only what you need so people can help you.
– Francisco
I made the change, but the doubt is how to pass the data of what I selected in my select to the fields, name: emai: password: picture.
– Rodrigo Zanetti