My code has one textarea and submit button. When type text in textarea and submit, the text is display on the screen and old text is still in textarea. The problem is when type \ or ' first when submit the \ is duplicate to \\ when submit again will get \\\\ and double .............
I type only one \ and submit many time, the result is I have many \ in text area . Is this bug. Can I correct this?
Here is my code
PHP Code:<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<LINK REL=STYLESHEET TYPE="text/css" HREF="../general.css">
</HEAD>
<BODY BGCOLOR="#FFFFFF">
<form method=post action="<? echo $PHP_SELF; ?>">
<textarea name=text cols=80 rows=10><? echo $text; ?></textarea><br>
<input type=submit>
<? $text = nl2br(htmlspecialchars($text)); ?>
</form>
<?
print "<br>$text"; //nl2br
?>
</BODY>
</HTML>








Bookmarks