Mark, Ignatius, John,

Thanks guys, I was able to use this:

  $Message = str_replace("  ","  ",$MessageText);
  $MessageText = preg_replace("/(\015\012)|(\015)|(\012)/","&nbsp;<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]>
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
> 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
> --
> PHP Database Mailing List (
> To unsubscribe, visit:

PHP Database Mailing List (
To unsubscribe, visit:

Reply via email to