Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

storing text with format to the database 1

Status
Not open for further replies.

misslois74

Programmer
Sep 27, 2008
63
0
0
PH
im working on a page which has a textarea component in which the user would enter his/her description now what my problem is if the user for instance press the <ENTER> key to apply certain format on the text to be stored, the text gets stored on the database but if the description is now retrieved from the database and displayed to the page the formatting done like the new space is not applied....
do i have to use specific function in terms of capturing the text with certain format?
 
ok... i was able to figure this out i just need to use nl2br function before the actual storing in the database
thanks...
 
better to store the text in unchanged form in the database and echo it to the screen using nl2br (when not using a textarea to display). when using a textarea to display, just echo the column normally.
 
thanks that was better application i was able to use....
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top