2uzhan.com
Advertisement
Now Place:2uzhan.com » Saved Data Formating goes Bye, bye

Saved Data Formating goes Bye, bye

PHP @ December 31, 1969   Views:0

K, I just did a search for this on the forum and found a couple of posts that the people where having the same problem as me but did not see a fix.

What I have is a news system that you type up in a Text Area some text, then hit Submit, I send the Textarea Value to MySQL in a BLOB cell and it gets saved there. Now when I pull it up the Spacing is removed.

Example:
(Textarea that is send to MySQL)
Hello,

My Name Is

I life in.

I like everyone.

----End of input

(WHat comes out of MySQL when I pull it with PHP)
Hello, My Name Is I life in. I like everyone.

----end of output

ANyways I can but

PHP Code:

Hello, <br><br> My Name Is <br><br> 

and it works but then I have to tell people to use the HTML code for spacing. It is probebly something simple that I am doing, please let me know how I can send text to MySQL and pull it back out with the same formating.

I found my fix

I looked a little harder and found what I wanted.

ANyways Here is what I did just in case someone else has the same problem

this will make the spacing correct when saving stuff from a Text area.

PHP Code:

$message=nl2br($_REQUEST['message']); 

--------------Solutions-------------

Tags:
© 2018 2uzhan.com Contact