PDA

View Full Version : Maintaining formatting of textarea input


mouse
09-15-2002, 09:20 PM
Found nl2br() and stripslashes() so panic over. Hope this helps somebody anyway... :o

Nightfire
09-15-2002, 09:32 PM
Can use

$textfromtextarea = nl2br($textfromtextarea) ;

echo $textfromtextarea

Of course, change textfromtextarea to whatever your textarea's called :)

And I'm just guessing here

$textfromtextarea = stripslashes($textfromtextarea);

OR

$textfromtextarea = striptags($textfromtextarea);

I think one of those is meant to help with the \'s

mouse
09-15-2002, 09:37 PM
Sorry I edited. Thanks anyway. :p;)

Nightfire
09-15-2002, 09:37 PM
:p I was right for once *pats self on back*