View Single Post
  #1 (permalink)  
Old 03-30-04, 02:56 PM
Poodle Tosser Poodle Tosser is offline
New Member
 
Join Date: Mar 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
How do I get line breaks to carry over from form to database?

I've created a very simple form using PHP that allows a user to add/delete/update the news items on a homepage.

The form asks a user to enter a Title, Date, and Article which are then uploaded to the corresponding fields in the MySQL database.

My problem is that the line breaks in the Article input area don't carry over to the database. For instance, if I cut and paste a 2 paragraph article from Word into the form, it just shows as one paragraph once it reaches the website.

Is there a way to make sure the appropriate <br> or <p> tags are inserted into the copy on it's way to the database?

I hope this is clear.

Thanks,
Glenn
Reply With Quote