how to store /n and /r from textarea on form in database

how to store /n and /r from textarea on form in database

am 03.05.2006 11:14:11 von reply

When you want to preserve linefeeds and or carriage returns (/n, /r/n, /r)
from textarea and store it in a database.
I don't want to store a
in the database.
I do want to have the choice of replacing /n and /r with a
when
displaying the data in browser, i guess this is what nl2br is for ? But
according to the comments on the phpmanual the nl2br function isn't that
good.
So what do u do when u want to store text with linefeeds and carriage
returns in database (or do u have to do nothing) ?
What with é, ç à, ö, ...
That's for trusted input by myself, what with input by others ... strip
html-tags and script-tags ?

thanx,

Pugi!

Re: how to store /n and /r from textarea on form in database

am 05.05.2006 12:26:24 von Rik

Pugi! wrote:
> So what do u do when u want to store text with linefeeds and carriage
> returns in database (or do u have to do nothing) ?

You don't have to do anything, linefeeds can easily go in a database.

Grtz,
--
Rik Wasmus