carlg Posted September 3, 2007 Share Posted September 3, 2007 I have a program that uses a TEXTAREA and collects some input from the user. It stores the textarea text in a text mysql field. Later on in processing it the text gets reiterated back to the screen, but this time the returns (new lines are gone) For example if my user types the following in the text box: My dog jumped the fence It will reiterate back later as My dog jumped the fence Seems like mysql is storing the return (because there is a control char when I look at it thru the query browser), seems like PHP is not putting it out properly. Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/67807-carriage-returns-new-lines-in-user-input/ Share on other sites More sharing options...
sasa Posted September 3, 2007 Share Posted September 3, 2007 use nl2br() function before echo text Quote Link to comment https://forums.phpfreaks.com/topic/67807-carriage-returns-new-lines-in-user-input/#findComment-340760 Share on other sites More sharing options...
d22552000 Posted September 3, 2007 Share Posted September 3, 2007 \n is a newline.. \r is a macintosh newline. \t is a tab space (5char) Maybe that might help you, maybe it wont.. but I don't really understand the problem. Quote Link to comment https://forums.phpfreaks.com/topic/67807-carriage-returns-new-lines-in-user-input/#findComment-340761 Share on other sites More sharing options...
hostfreak Posted September 3, 2007 Share Posted September 3, 2007 \n is a newline.. \r is a macintosh newline. \t is a tab space (5char) Maybe that might help you, maybe it wont.. but I don't really understand the problem. Your post is irrelevant... sasa provided him with the solution. Quote Link to comment https://forums.phpfreaks.com/topic/67807-carriage-returns-new-lines-in-user-input/#findComment-340763 Share on other sites More sharing options...
carlg Posted September 3, 2007 Author Share Posted September 3, 2007 Thanks for the help Quote Link to comment https://forums.phpfreaks.com/topic/67807-carriage-returns-new-lines-in-user-input/#findComment-340770 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.