Re: Form TextArea Formatting

From: Date: Mon, 09 Dec 2002 12:48:08 +0000
Subject: Re: Form TextArea Formatting
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-23930@lists.php.net to get a copy of this message
Mark, Ignatius, John et.al., Thanks guys, I was able to use this: $Message = str_replace(" ","&nbsp;&nbsp;",$MessageText); $MessageText = preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<br />", $Message); It works perfectly, at least on my Windows machine. The data is not only input from the Textarea, but it is also later displayed back in the Textarea and these to lines work perfectly for new lines, indents and spaces. Larentium ----- Original Message ----- From: "Keith Spiller" <larentium@hosthive.com> To: <php-db@lists.php.net> Sent: Monday, December 09, 2002 4:01 AM Subject: [PHP-DB] Form TextArea Formatting > Hello, > > I've created a web form that includes a textarea input box called > MessageText. The data from this form will be inserted into a mysql table. > My problem is that the form users will be inserting formatted text into this > textarea and I need to be able to transfer the formatting as well as the > content into the database. Right now, all formatting is lost in the > transfer. Any ideas or suggestions? > > Thank you for your help. > > Larentium > larentium@hosthive.com > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.db (#23930) next »