Advertisement

02.10.2008 at 05:03AM PST, ID: 23151239
[x]
Attachment Details

textarea new line character problem

Asked by gamebits in PHP and Databases, Hypertext Markup Language (HTML), MySQL

Tags: php and mysql, all

First, everuthing was working fine and now it's not.

If I type in the textarea of my form

EE
is
the
best

using the enter key to go to a new line, it now insert in the db

EE\r\nis\r\nthe\r\nbest

I used

$text = $_POST['text']
$text = str_replace("\n", "<br>\n", $text);

to replace the new line character, I also try nl2br() function to no avail and like I said it was working fine before, any advice?Start Free Trial
[+][-]02.10.2008 at 05:07AM PST, ID: 20860938

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PHP and Databases, Hypertext Markup Language (HTML), MySQL
Tags: php and mysql, all
Sign Up Now!
Solution Provided By: angelIII
Participating Experts: 1
Solution Grade: A
 
 
[+][-]02.10.2008 at 05:28AM PST, ID: 20860973

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.10.2008 at 05:31AM PST, ID: 20860982

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.10.2008 at 05:33AM PST, ID: 20860985

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.10.2008 at 05:41AM PST, ID: 20861027

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]02.10.2008 at 05:58AM PST, ID: 20861072

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]02.17.2008 at 06:17AM PST, ID: 20914051

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628