View Single Post
Old 12-04-2012, 02:19 AM   PM User | #1
Eggweezer
New Coder

 
Join Date: May 2012
Posts: 99
Thanks: 77
Thanked 0 Times in 0 Posts
Eggweezer is an unknown quantity at this point
How do I insert paragraph into database, without losing line feeds?

As you know, clients often like to be able to enter their own content on their websites.
I create a simple user interface where the client can enter fields such as Name, Address, Phone, etc.
I then insert each into the appropriate fields of my SQL database.

My problem is when I try to insert a "whole paragraph", ( if they want to update the "News",etc on their site) that I would output into a div.

When the user clicks "Submit", the data gets inserted into a field in my SQL database. PROBLEM: when I output it onto my page (say, into a div), it is one continuous string of data, meaning the line feeds are ignored.

Is there a way that I can correct this issue? Or steer me in a direction? I would like to know if there is a trick to this? I cannot be the first one running into this issue.

Any help would be appreciated! Thank you very much in advance.
Eggweezer is offline   Reply With Quote