Page 1 of 1

[RESOLVED] Insert linebreaks autmotically when posting?

Posted: Thu Aug 17, 2006 7:33 pm
by LuiePL
I'm looking to setup an article submission page for my members. Kind of along the same theory as the backend of phpBB2 and other forums. The admins will "activate" the submissions after they proofread them. However, I don't want people to have to type the HTML code themselves within the article to get linebreaks to work. When you hit "ENTER" in any forums, like this one, it stores it in the database, and when read, it does it backwards (has the linebreaks set) too.

So does anyone know of the command I would use, or function I would have to create to get it to work? I hope my question makes sense. Thanks for the help.

Posted: Thu Aug 17, 2006 7:38 pm
by feyd
nl2br() is your friend.

Posted: Thu Aug 17, 2006 7:45 pm
by LuiePL
Indeed! Thanks!