aarchaic Posted May 26, 2009 Share Posted May 26, 2009 hey guys i have a little issue. I'm working on a site where a person can put some information in about themselves what happens is that once you wrote a nice long block of info and spaced it and so on you click save and it updates to my database. but once you call it back in the website i just get 1 huge chuck of text and you lost all your spacings and formatting you did while writing the info. can anybody please shed some light on how i can over come this? Quote Link to comment https://forums.phpfreaks.com/topic/159787-solved-php-styling/ Share on other sites More sharing options...
lonewolf217 Posted May 26, 2009 Share Posted May 26, 2009 it depends on how you store and retrieve the data. do you sanitize it in any way to remove formatting ? Assuming this is done in a text area, you can use functions such as nl2br($text) to convert all of the newlines to the html equivolent <BR> for display purposes Quote Link to comment https://forums.phpfreaks.com/topic/159787-solved-php-styling/#findComment-842765 Share on other sites More sharing options...
aarchaic Posted May 26, 2009 Author Share Posted May 26, 2009 it depends on how you store and retrieve the data. do you sanitize it in any way to remove formatting ? Assuming this is done in a text area, you can use functions such as nl2br($text) to convert all of the newlines to the html equivolent <BR> for display purposes Thanks! just what i needed Quote Link to comment https://forums.phpfreaks.com/topic/159787-solved-php-styling/#findComment-842776 Share on other sites More sharing options...
MadTechie Posted May 27, 2009 Share Posted May 27, 2009 Topic Solved ? if so please click it Quote Link to comment https://forums.phpfreaks.com/topic/159787-solved-php-styling/#findComment-842782 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.