textarea, carriage returns and formatting

From: Date: Tue, 20 Nov 2001 23:34:11 +0000
Subject: textarea, carriage returns and formatting
Groups: php.general 
Request: Send a blank email to php-general+get-75324@lists.php.net to get a copy of this message
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

« previous php.general (#75324) next »