Page 1 of 1

PHP mySQL

Posted: Sat May 27, 2006 12:08 pm
by tommy1987
I have a form where I have a textarea which I am storing in a mySQL database field (type: text). This includes a large amount of text, and if new lines are typed into the textarea then stored, I want them to be displayed when i display it from the database onto the website, however it just puts all the text together, ignoring newlines and spaces.

Hope someone can help. Thanks in advance.

Posted: Sat May 27, 2006 12:10 pm
by hawleyjr
Can we see some code?

Posted: Sat May 27, 2006 12:11 pm
by twigletmac
nl2br() is probably the place to start

Mac

Posted: Sun May 28, 2006 8:31 am
by tommy1987
The nl2br() function provided just what I was looking for. Is there something to insert   to conserve spaces entered also?

Thanks very much..

Posted: Sun May 28, 2006 8:33 am
by feyd