1
Good afternoon, I have a class where I pass all the methods insert, update, delete, consulta(fechall) and consulta(fech($id))
Below I show the class of consulta(fech($id))
public function selId($id){
    $sqlId = "SELECT * FROM web_cadcli WHERE idcad_cliente = ':id_us', nom_cliente = $this->getNome($nome), ema_cliente = $this->getEmail($email), senha_email = $this->senha($senha)  ";
    $sqlId = $this->con->conectar()->prepare($sqlId);
    $sqlId->bindParam(':id_us', $this->cod,   PDO::PARAM_INT);
    $sqlId->bindParam(1,        $this->nome,  PDO::PARAM_STR);
    $sqlId->bindParam(2,        $this->email, PDO::PARAM_STR);
    $sqlId->bindParam(3,        $this->senha, PDO::PARAM_STR);
    $sqlId->execute();
    return ($sqlId->fetch(PDO::FETCH_ASSOC));
    }//retorna o Id do Usuario - testar
I want to search values in the database with ID and later recover in my form
Below I show my form with the code where I need to recover the values.
<?PHP
        $Objeto = new Usuario(); 
        $usuario = $Objeto->selId(); ?><!--SELECIONO O ID DO METODOS selId-->
          <input name="id_ui" type="hidden" value="id_usu"/>
          <div class="form-group">
            <label for="exampleInputEmail1">Nome</label>
            <input type="nome" class="form-control" id="exampleInputEmail1" value="<?php $usuario->setNome($nome); ?>">
          </div>
          <div class="form-group">
            <label for="exampleInputPassword1">Email</label>
            <input type="email" class="form-control" id="exampleInputPassword1" value="<?php $usuario->setNome($nome) ?>">
          </div>
          <div class="form-group">
            <label for="exampleInputFile" disable>Imagem</label>
            <input type="file" id="exampleInputFile">
           </div>
          </form>
Methods
set()usually do not return value. If you want to print the value invalueinput do not forget theechoorprint– rray