Jump to content

[SOLVED] Enter textarea into db without line breaks


keeps21

Recommended Posts

I have a textarea which I'm inserting into a database field.

 

The problem I'm having is that if a user types in the textarea

Line one.
Line Two.
Line Three.

the text is stored in the database as:

Line one.
Line Two.
Line Three.

 

What I want is for the text to be stored as

Line one. Line Two. Line Three.

as it needs to be all on one line when It's output in the html source otherwise it breaks the Javascript. But I can't figure out how to.

 

Note: There are no /n or /r tags in the database once saved. The only text is what you see above.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.