Forum Moderators: coopster
Been using the nl2br() to format the text that is inserted into a textarea and then sent to mysql. But two different problems have occured now..
First one:
Once I edit the text in the textarea and send it, it looks fine. But when I have to alter it again the <br /> tags are shown and they should appear I guess. But when the text is sent into mysql database once more the <br /> tags are twice as many. And the formatting is screwed up. Is there any way to get rid of it? Below is the code that I use for the sql query.
-----------------
// Update the following parts in the info table from the values that are sent from update_info.php form
$query="UPDATE info SET infotext='".$_POST['text_info']."', rubrik='".$_POST['rubr_info']."';";
mysql_query(nl2br($query));
-----------------
Second one:
Is it possible to not show the <br /> tags in the textarea?