List:General Discussion« Previous MessageNext Message »
From:Douglas Brantz Date:November 1 2000 7:09pm
Subject:Re: Preserving format of text fields
View as plain text  
I usually use Text fields in Mysql to hold the body of text and then when I
display it back I use the <pre> command in html so it will use the format it
was type in.

Hope this helps


Claus Nybo wrote:

> 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


Douglas Brantz
Computer Consultant
Fine & Applied Arts
Appalachian State University
Boone, NC 28608

828-262-6312 FAX
828-262-6549 OFFICE

Preserving format of text fieldsClaus Nybo1 Nov
  • RE: Preserving format of text fieldsOrd Millar1 Nov
    • Re: Preserving format of text fieldsJulia A . Case1 Nov
  • Re: Preserving format of text fieldsDouglas Brantz1 Nov
  • Re: Preserving format of text fieldsJames Treworgy2 Nov
  • Re: Preserving format of text fieldsStudent7 SNT2 Nov