2
Good morning. I was wondering how do I get the information I want sent inside the input(Client name), because I did select and the information was not placed in the form field, it was on top . Follow my code below.
PHP
<body>
<?php
include_once '../DAO/Connect.php';
include_once '../model/Cliente.php';
$conexao = new Conexao();
$cliente = new Cliente();
$cliente = $conexao->selectCliente("_ID=" . '10');
$cliente->getNome();
echo $cliente->getNome(); ?>
HTML
<form action="#" method="get">
<label>Nome Cliente</label><br />
<input type="text" name="nome" size="80" /><br />
<label>Nome Fantasia</label><br />
<input type="text" name="nome-fantasia" size="80" /><br />
<div class="ao-lado">
<label>CNPJ/CPF</label><br/>
<input type="text" name="cpf" size="37" />
</div>
</form>
Where do you want to put the name? in input value? This PHP and HTML code are in the same PHP file?
– Sergio
Forehead
<input type="text" name="nome" size="80" value="<?php echo $cliente->getNome(); ?>" />
– Sergio
Opa , sorry for the delay, I had left. But I’ve returned
– Ruan Rodrigues
They’re all in the same file, yes, I want to put in input value
– Ruan Rodrigues
Friend, it worked. Thank you very much! If you want to put as answer, I will mark as right .
– Ruan Rodrigues