Re: Carriage returns
| From: | Stephen | Date: | Fri, 18 Oct 2002 19:35:36 +0000 |
| Subject: | Re: Carriage returns | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-120553@lists.php.net to get a copy of this message | ||
Actually, what the user types in then goes out into an email. I'd have to
switch the enters into \n but I'm not sure how...
----- Original Message -----
From: "Brent Baisley" <brent@landover.com.>
To: "Stephen" <webmaster@melchior.us>
Cc: "PHP List" <php-general@lists.php.net>
Sent: Friday, October 18, 2002 2:24 PM
Subject: Re: [PHP] Carriage returns
> You want to use addslashes before you store it in the database. When you
> retrieve the data, you want to use removeslashes to convert things back.
> If you are just going to display the submitted text as regular text on a
> page, you want to use nl2br to convert the returns (new lines) to and
> html <br />.
>
> On Friday, October 18, 2002, at 03:02 PM, Stephen wrote:
>
> > Hello,
> >
> > How can I make it so when a user types something in to a textarea, when
> > they push enter, it stays as an enter? I've tried using a replace
> > function that replaces the ASCII code for enter to \n but that didn't
> > work.
> >
> > Thanks,
> > Stephen Craton
> > http://www.melchior.us
> > http://php.melchior.us
> >
> --
> Brent Baisley
> Systems Architect
> Landover Associates, Inc.
> Search & Advisory Services for Advanced Technology Environments
> p: 212.759.6400/800.759.0577
>
>