textarray and new lines

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stijn Goris

    textarray and new lines

    hi all,

    I have a textarea in which users can enter text. When submitted the data is
    stored in a database.
    This works fine except when a new line is inserted (enter). This is not
    stored in the database.
    Is it possible to do this?

    regards


  • David Robley

    #2
    Re: textarray and new lines

    In article <3f0ad609$0$275 $ba620e4c@reade r1.news.skynet. be>,
    mepisto@hotmail .com says...[color=blue]
    > hi all,
    >
    > I have a textarea in which users can enter text. When submitted the data is
    > stored in a database.
    > This works fine except when a new line is inserted (enter). This is not
    > stored in the database.
    > Is it possible to do this?
    >
    > regards[/color]

    Well, it is actually stored in the database - but if you try to display it
    in a browser the browser will ignore new lines. Look at nl2br() to add <BR
    /> before display.

    (If there were a FAQ this would be in it)

    --
    Quod subigo farinam

    $email =~ s/oz$/au/o;

    Comment

    • Stijn Goris

      #3
      Re: textarray and new lines

      thanks

      "David Robley" <robleyd@ozemai l.com.oz> wrote in message
      news:MPG.19757d 2efa77aa799896b f@news.spiderwe b.com.au...[color=blue]
      > In article <3f0ad609$0$275 $ba620e4c@reade r1.news.skynet. be>,
      > mepisto@hotmail .com says...[color=green]
      > > hi all,
      > >
      > > I have a textarea in which users can enter text. When submitted the data[/color][/color]
      is[color=blue][color=green]
      > > stored in a database.
      > > This works fine except when a new line is inserted (enter). This is not
      > > stored in the database.
      > > Is it possible to do this?
      > >
      > > regards[/color]
      >
      > Well, it is actually stored in the database - but if you try to display it
      > in a browser the browser will ignore new lines. Look at nl2br() to add <BR
      > /> before display.
      >
      > (If there were a FAQ this would be in it)
      >
      > --
      > Quod subigo farinam
      >
      > $email =~ s/oz$/au/o;
      >[/color]


      Comment

      Working...