All,
I have a textarea that someone can type in. When I submit the form and insert in into my database I do it like this:
$textarea = mysql_real_escape_string($_POST['textarea']);
When I display the output I do it like this:
echo stripslashes($textarea);
However when I do it this way it removes the returns from the textarea. When I try and edit the textarea from mySQL though it puts the returns back in. Any idea why this would be?
You can use
nl2brin this way:If you need more info, this is the official documentation page: link.