I have created a form with a text area (called content). If the user enters data into this text area it should update the database. However, it is only doing this when what is entered into the text area is very short. How do I make it so I will send longer bits of text to the database?
Code:
<form action="" method="post" id="contenteditform">
<textarea rows="10" cols="100" name="NewContent" form="contenteditform"> <?php echo $content; ?> </textarea>
<input type="submit" name="button4" value="_submit" />
</form>
<?php
if(isset($_POST["button4"]))){
$NewContent=$_POST['NewContent'];
$connection=new mysqli($dbhost,$dbusername,$dbpass,$dbname);
$sql="UPDATE Approved SET Content='$NewContent' WHERE id='$id'";
$connection->query($sql);
$connection ->close();
};
?>