Re: Carriage Returns

From: Date: Fri, 06 Nov 2009 17:16:05 +0000
Subject: Re: Carriage Returns
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-299683@lists.php.net to get a copy of this message
Are you using nl2br to convert before recording or after? "Dan Shirah" <mrsquash2@gmail.com> escreveu na mensagem news:a16da1ff0911060824k779f7457wa1111fd6e8f4e419@mail.gmail.com... > Hello all, > > Basically I have a form with a <textarea>. The user can enter up to 5,000 > characters in this text area. > > If the user just types text like: This is a test. > > And saves it, there's no problem. > > However if the user types: > > This > > Is > > A > > Test > > And saves it, the insert bombs. > > I've tried using nl2br($text) and str_replace("\r","#CR",$text) to > convert > the carriage returns, but it still crashes. > > I'm using an informix database and the column is: my_text CHAR(5000) > > Any ideas why it crashes any time there is a carriage return in the text > area? > > Thanks, > Dan >

« previous php.general (#299683) next »