Re: Carriage returns

From: Date: Fri, 18 Oct 2002 19:24:40 +0000
Subject: Re: Carriage returns
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-120551@lists.php.net to get a copy of this message
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

« previous php.general (#120551) next »