View Full Version : Format text from a form
Ceejeeb
February 19th, 2007, 07:42 AM
I have a form on my site so people can post comments. At the moment the message box is a text area and its is just stored as text in th database. I need to be able to keep the formatting that they use in their message (eg line brakes etc).
Im sure it can be done, any ideas?
bwh2
February 19th, 2007, 08:39 AM
[d-php]nl2br[/d-php]
Ceejeeb
February 19th, 2007, 10:00 AM
This deosnt seem to work for me. From what i can see this only works if the user types \n in their comment, but i need to insert a <br> when ever they have hit enter.
Ceejeeb
February 20th, 2007, 11:03 AM
sorry my bad it does work :blush:
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.