Connecting Tech Pros Worldwide Forums | Help | Site Map

textarray and new lines

Stijn Goris
Guest
 
Posts: n/a
#1: Jul 16 '05
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
Guest
 
Posts: n/a
#2: Jul 16 '05

re: textarray and new lines


In article <3f0ad609$0$275$ba620e4c@reader1.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;

Stijn Goris
Guest
 
Posts: n/a
#3: Jul 16 '05

re: textarray and new lines


thanks

"David Robley" <robleyd@ozemail.com.oz> wrote in message
news:MPG.19757d2efa77aa799896bf@news.spiderweb.com .au...[color=blue]
> In article <3f0ad609$0$275$ba620e4c@reader1.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]


Closed Thread