losing formatting in mysql database

Discussion in 'MySQL' started by Rasputin, Oct 29, 2008.

  1. #1
    Hi
    I'm quite new to all this!
    I have a form where users enter text in a text area, which then gets posted to a mysql database.
    when the data is retrieved it shows as one paragraph, even if the original entry was a few different paragraphs.
    how do i keep the sentences separate - ie keep the formatting as originally entered?

    Cheers
     
    Rasputin, Oct 29, 2008 IP
  2. mwasif

    mwasif Active Member

    Messages:
    816
    Likes Received:
    23
    Best Answers:
    1
    Trophy Points:
    70
    #2
    Use nl2br() when displaying data.
     
    mwasif, Oct 30, 2008 IP