yami007 Posted December 31, 2009 Share Posted December 31, 2009 without using any function to display what the user has entered in a textarea if there has been any errors in the form, the issue comes this way : when i jump the lines in textarea as usual : hi i am just trying to enter the world of php. and i am here to learn more & more. this turns to be this way hi i am just trying to enter the world of php.\r\nand i am here to learn more & more. why this? and how can i prevent this ?? Link to comment https://forums.phpfreaks.com/topic/186791-nl2br-text-area-rn-problem/ Share on other sites More sharing options...
phppaper Posted December 31, 2009 Share Posted December 31, 2009 $textarea = nl2br($_POST['textarea']); Link to comment https://forums.phpfreaks.com/topic/186791-nl2br-text-area-rn-problem/#findComment-986392 Share on other sites More sharing options...
yami007 Posted December 31, 2009 Author Share Posted December 31, 2009 it normally works without nl2br function, but i am not calling $_POST[] i am using sessions to save what users post to submit them in other page and then return them to the same page where they were submitted ! so with or without nl2br, this thing does not work. i dont know what to do, i am stuck here !! Link to comment https://forums.phpfreaks.com/topic/186791-nl2br-text-area-rn-problem/#findComment-986397 Share on other sites More sharing options...
yami007 Posted December 31, 2009 Author Share Posted December 31, 2009 ok i figured the reason, i knew it's the htmlspecialchars doing, but i forgot to do some changes to the code it's ok now !! Link to comment https://forums.phpfreaks.com/topic/186791-nl2br-text-area-rn-problem/#findComment-986401 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.