shamsuljewel Posted October 2, 2007 Share Posted October 2, 2007 Hi all, I have a textarea and I input 3 lines on it and save the data in a database field name signature (text). When I print it shows in one line. I use $signature = $_POST['signature']; $signature = stripslashes($signature); $signature = str_replace("rn","<br>", $signature); But still it doesnot work. Any Suggestion???? Quote Link to comment https://forums.phpfreaks.com/topic/71493-solved-save-with-newline-in-database/ Share on other sites More sharing options...
xylex Posted October 2, 2007 Share Posted October 2, 2007 $signature = str_replace("\r\n","<br>", $signature); Quote Link to comment https://forums.phpfreaks.com/topic/71493-solved-save-with-newline-in-database/#findComment-359895 Share on other sites More sharing options...
shamsuljewel Posted October 2, 2007 Author Share Posted October 2, 2007 no still not worked!! Quote Link to comment https://forums.phpfreaks.com/topic/71493-solved-save-with-newline-in-database/#findComment-359898 Share on other sites More sharing options...
shamsuljewel Posted October 2, 2007 Author Share Posted October 2, 2007 thanks It works..... Quote Link to comment https://forums.phpfreaks.com/topic/71493-solved-save-with-newline-in-database/#findComment-359900 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.