Jump to content

Preserve Line Breaks in variable from <textarea>?


grippat
 Share

Recommended Posts

I have a form which contains a <textarea> element where people are supposed to type several paragraphs. I then use PHP to save this element's contents to a MySQL database. When I use PHP to display the textarea's contents from the database on another page the line breaks have all been removed. Is there a way I can tell PHP or MySQL to preserve the line breaks so the text is in paragraphs?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...