RE: [PHP-DB] Preserving format of text fields
| From: | Jason Stechschulte | Date: | Wed, 01 Nov 2000 21:42:29 +0000 |
| Subject: | RE: [PHP-DB] Preserving format of text fields | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-4104@lists.php.net to get a copy of this message | ||
nl2br()
Jason Stechschulte
jpstech@nc.edu
-----Original Message-----
From: Claus Nybo [mailto:claus@nnwebdesign.com]
Sent: Wednesday, November 01, 2000 9:21 PM
To: php-db@lists.php.net
Subject: [PHP-DB] Preserving format of text fields
Hi,
I am working on a website using php3 and mySQL. On one page in
the site
administration is inputting new articles, via a form, with fields
such as
$title, $date, $article, etc. These are then passed to mySQL, to
be viewed
on another page by users.
This all works fine, except for the text of the article itself.
When the
text is typed in to the textfield on the form, it exist of
several
paragraphs, with blank lines in between, but when it is viewed
from the
database on another page all the paragraph breaks and blank lines
are gone,
and all the text is displayed in just one long continued block.
What do I do to preserve the format in which the text is typed?
With the
different paragraf breaks and blank lines?
Thanks for the help!
Claus