Error sending form to write [duplicate]

0

You are generating the following error when submitting my form to save: Notice: Undefined index: client in C: \ xampp \ htdocs \ guaraparivirtual \ adm-gc \ record-text.php on line 3

This code below $idcli = $_GET['cliente']; is the customer code I get from another page before you get here. The next code also needs to receive this parameter to write the data to the correct client, and that is where it generates the error, since this parameter is passed through the action of the form.

Form Page:

<?php
$idcli = $_GET['cliente'];
?>
<?php
$painel=mysqli_query($con,"select detalhe_sobre from anuncios where id = '$idcli'");
while($painel_texto=mysqli_fetch_array($painel)){
$texto_empresa = $painel_texto['detalhe_sobre'];
}
?>
<form class="frm-adm-painel" action="gravar-texto.php?cliente=<?php echo $idcli; ?>">
    <textarea name="textoempresarial" rows="10" placeholder="Texto sobre a Empresa">
    <?php echo utf8_encode(strip_tags(nl2br($texto_empresa)));  ?>
    </textarea>
    <button type="submit">GRAVAR</button>
</form>

Page that generates the error:

The line that generates the error is this: $idcli = $_GET['cliente'];

<?php
$idcli = $_GET['cliente'];
?>
<?php
if (isset($_POST["submit"])){
    echo "Gravado com sucesso";
}
?>
    
asked by anonymous 24.07.2017 / 19:46

0 answers