grazzman Posted January 19, 2007 Share Posted January 19, 2007 So, This should be a simple one. I have a TextArea on a form. When you submit, it goes to a text field in the Mysql. When I echo the data, it looses all its formating... As in, if I have multiple lines it will echo it as one big line unless I put html code in to the textarea. Is their a way to fix this?Thanks Quote Link to comment Share on other sites More sharing options...
simcoweb Posted January 19, 2007 Share Posted January 19, 2007 What mode is your field in the mysql database? Is the textarea field set as 'text'? Quote Link to comment Share on other sites More sharing options...
grazzman Posted January 20, 2007 Author Share Posted January 20, 2007 Yep,MyBio text latin1_swedish_ci NULLand the echo is just echo $user['MyBio'], form is just a textarea form field Quote Link to comment Share on other sites More sharing options...
effigy Posted January 20, 2007 Share Posted January 20, 2007 See the nl2br function. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted January 20, 2007 Share Posted January 20, 2007 So I understand...you're echo'ing the text INTO a text area? So it's populating the text area form field as if someone was going to edit it? Like in a profile, for example? Quote Link to comment Share on other sites More sharing options...
grazzman Posted January 20, 2007 Author Share Posted January 20, 2007 yea, thenl2br($user['MyBio']) did the trick... Thanks again, I LOVE THIS FORUM. Quote Link to comment Share on other sites More sharing options...
simcoweb Posted January 20, 2007 Share Posted January 20, 2007 Yep, we learn something new everyday here :) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.