Forum Moderators: coopster
What happens is the fact to see carriage returns and line feeds displayed like: \r\n. Everywhere the enter button has been hitted, you always see those boring signs when the textarea content gets reechoed. I tried the nl2br and the trim functions to remove them but could not. What can i do?
txs
What happens is the fact to see carriage returns and line feeds displayed like: \r\n.
First, this is what you see- but is it really what's in the page code?
View the source of the page, look for the text area content.
Do you see \r\n when you view source, or
%5cr%5cn
or some other html-ized entity?
It could be encoded. Whatever the case, between submit and return to the form, something in your program is doing this.
In the event an error is found either missing data or improper data don't run the data through mysql_real_escape_string until you are ready to put data in the db run it through something like this $var = htmlentities(trim($var), ENT_QUOTES, "UTF-8");
Your mileage may vary but as I said I had issues and that was my solution.