I have tried the code below but it just wrote '1' in the database instead of the text i wrote. i tried the same with input type="text" and it worked. Why does it not work with textarea? Ofc i have the if(isset) function too.. PHP:
$connectionText = mysql_connect("localhost", "root");
if(!$connectionText){
die("Noget gik galt?". mysql_connect_error());
}
mysql_select_db("textbox", $connectionText);
$t = isset($_POST['tekst']);
$sqlScript = "INSERT INTO forms (tekst) VALUES ('$t')";
mysql_query($sqlScript, $connectionText);
mysql_close($connectionText);
?>
HTML:
<form action="post.php" method="POST">
<textarea name="tekst" autocapitalize="on" autocomplete="off"
autocorrect="off"
class="textBox" maxlength="140"></textarea>
<input type="submit" value="Offentligør" name="submit">
</form>