lostprophetpunk Posted February 16, 2009 Share Posted February 16, 2009 I am in the process of building a comment system for my website, however I have come across a problem. I can get the comments displaying correctly when they are submitted to the database, but when I try to echo them out in the textarea they do not display properly. I will try and explain it below... Say if the user typed in the textarea the following... Hello, I do like this... ...My name is bob. But if the user get's an error when submitting the form, it will not display like that when it is echoed out again, it will be something like this... Hello, I do like this...\n\n\n\r\n\n\n\r...My Name is bob. It would display all in one block. So how would I be able to echo it out again just as the user typed it in the first place? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/145377-form-textareas/ Share on other sites More sharing options...
haku Posted February 16, 2009 Share Posted February 16, 2009 nl2br Link to comment https://forums.phpfreaks.com/topic/145377-form-textareas/#findComment-763192 Share on other sites More sharing options...
lostprophetpunk Posted February 16, 2009 Author Share Posted February 16, 2009 I have tried that already, but it still displays the same way in the textarea. I have also tried stripslashes as well. Link to comment https://forums.phpfreaks.com/topic/145377-form-textareas/#findComment-763198 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.