I have a form with a textarea
and I'm not able to send the data typed in it to the MySQL
database. How do I?
form.php
<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"/>
cadastro.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);
?>