-1
I have a form with a textarea and I’m not able to send the data typed in it to the bank MySQL. How do I do?
php form.
<form id="cadastro" name="cadastro" method="post" action = cadastro.php>
<textarea id="text_descricao" name="text_descricao" maxlength="800" cols="60" rows="15"; style="resize: none"></textarea>
<input name="cadastrar" type="submit" id="cadastrar" value="Cadastrar"/>
php.
<?php
    $descricao = $_POST['text_descricao'];
    $sql = "INSERT INTO mensagens VALUES ";
    $sql .= "('$descricao')";
    mysqli_query($conexao,$sql) or die("Erro ao tentar cadastrar registro");
    mysqli_close($conexao);
?>
What is the error? What is the structure of your table?
– Roberto de Campos