• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3099
  • Last Modified:

Save line breaks from <textarea> into MySQL without showing </b> etc...

Hi, I have a <textarea> in whitch I my text and then submit it to a MySQL database trough PHP.

The problem is that my text is saved ALL IN ONE LINE in MySQL event though I have multiple lines!

How do I do to save my line brakes too?

I don't want to use any </b> tags or other HTML thags.

1 Solution
text is not saved in oneline, it is just how you see it
use this function to display your text
GagikAuthor Commented:
Awesome! thanks a lot!!!
You can also use another function (although not as nice)
str_replace(Chr(13),'<br>', $var); 

Open in new window

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now