not sure what you're getting at. when you pull the text back out of the DB, it should be formatted the same as when it was put in the DB.
the \n's should still be intack are you processing the text before it gets entered into the DB? You should be able to do this: <textarea rows=* cols=*><?=$text_from_db?></textarea> Jim ----- Original Message ----- From: "Chris Aitken" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, November 20, 2001 3:34 PM Subject: [PHP] textarea, carriage returns and formatting > Hi, > > Something ive been trying to find out but cant seem to get the wording > right to find the answers in the archives. > > What I have is a mysql database, and in that DB I have a field which is > just a 'text' field. What I want to be able to do is write whatever text > is typed from the webforms textarea into the 'text' field, formatting in > tact. For example.... if this was typed into a textarea.... > > ---------------------------------- > This is some text ive typed > I have some single and double > > carriage returns in there, and I > want it to keep the formatting > ---------------------------------- > > When I pull it back out of the DB, I want to be able to display it back in > a textarea with the carriage returns in place exactly as it was typed in. > > Can anyone point me in the right direction. Is there a php function which > can convert/reconvert on the display from/insert to the database, or am I > missing something totally with this. > > > Thanks > > > > Chris > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > To contact the list administrators, e-mail: [EMAIL PROTECTED] > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]