drachma Posted August 11, 2002 Share Posted August 11, 2002 Hi all. I'm trying to create a in a forum then upload the data into mysql. However I noticed that once I upload the data, all formatting such as 'new line' and tab are completely gotten rid of. Now I understand that you need tags to emulate 'new line', , but how do I insert that into the textarea data before putting it into mysql? I see the vB and bulletin boards around do that, I was wondering how. Furthermore, is there a php function that automatically formats plain text or string? Thanks, any help would be appreciated. Link to comment Share on other sites More sharing options...
0 [idkfa] Posted August 11, 2002 Share Posted August 11, 2002 nl2br($string) is your friend :) Link to comment Share on other sites More sharing options...
0 drachma Posted August 11, 2002 Author Share Posted August 11, 2002 thanks so so much. this prob's been plaguin me for a while. and you know what's worse? i scanned through the php read me for like half an hour but totally didn't see that function. thanks so much Link to comment Share on other sites More sharing options...
Question
drachma
Hi all.
I'm trying to create a in a forum then upload the data into mysql.
However I noticed that once I upload the data, all formatting such as 'new line' and tab are completely gotten rid of.
Now I understand that you need tags to emulate 'new line',
, but how do I insert that into the textarea data before putting it into mysql?
I see the vB and bulletin boards around do that, I was wondering how.
Furthermore, is there a php function that automatically formats plain text or string?
Thanks, any help would be appreciated.
Link to comment
Share on other sites
2 answers to this question
Recommended Posts