Mark, Ignatius, John et.al.,
Thanks guys, I was able to use this:
$Message = str_replace(" "," ",$MessageText);
$MessageText = preg_replace("/(\015\012)|(\015)|(\012)/"," <br />",
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.
----- Original Message -----
From: "Keith Spiller" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Monday, December 09, 2002 4:01 AM
Subject: [PHP-DB] Form TextArea Formatting
> 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
> 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.
> [EMAIL PROTECTED]
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php