With each update of the same text, accented characters are duplicated.
See in the image below what happens every time I click refresh. As you can see, letters that have some type of accent are duplicated.
Do I make characters with accentuation no longer duplicated?
FormCode:
<?php$painel=mysqli_query($con,"select detalhe_sobre from anuncios where id = '$idcli'");
while($painel_texto=mysqli_fetch_array($painel)){
$texto_empresa = utf8_encode(strip_tags(nl2br($painel_texto['detalhe_sobre'])));
}
?>
<form class="frm-adm-painel" action="gravar-texto.php?cliente=<?php echo $idcli; ?>" method="post">
<textarea name="textoempresarial" rows="10" placeholder="Texto sobre a Empresa"><?php echo $texto_empresa; ?></textarea>
<button type="submit" name="botao">GRAVAR</button>
</form>
Record Code:
<?php
if (!empty($_GET['cliente'])){
$idcli = $_GET['cliente'];
$textoempresarial = utf8_encode($_POST['textoempresarial']);
$painel=mysqli_query($con,"UPDATE anuncios SET detalhe_sobre = '$textoempresarial' where id = '$idcli'");
header("location: painel.php?cliente=$idcli");
}
?>