Link to home
Start Free TrialLog in
Avatar of royalcyber
royalcyber

asked on

How to use the function nl2br

my problem is that when I save an essay into the MS sql database which is a varchar field it loses all the formatting tags. While searching in EE I found that many peple had used nl2br function to solve this problem but I still don't understand how to use this.

Ay help will be greatly appreciated
Avatar of royalcyber
royalcyber

ASKER

By the way I am using java as my backend programming language

SOLUTION
Avatar of InteractiveMind
InteractiveMind
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thnak you very much guys

But I actually found a better option, which is using javascript to create a formatting  toolbar like microsoft word and allow users to automatically add the tags
Please check out this website

http://tinymce.moxiecode.com/

Thanks but your answers also worked

Huzefa