Re: Processing newlines in a text area field

From: Date: Sat, 15 Oct 2011 01:22:21 +0000
Subject: Re: Processing newlines in a text area field
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-315306@lists.php.net to get a copy of this message
On 11-10-13 10:49 PM, Stephen wrote:
I have a web page with a form with a text area. I enter: foo bar PHP processes the POST and inserts the record into MySQL. The database field is text. I use PDO For testing I have removed any processing of the text area content. Now, no matter how many blank rows I have between foo and bar, in the database record, I always get a single newline character. Found the problem. I was not passing the record key properly to the SQL UPDATE transaction.
So I had WHERE id = "" Valid SQL so no error. But no record update :( Thanks all Stephen

« previous php.general (#315306) next »