storing textarea field into db without carriage return
Posted on 2004-09-24
I have a html form with a textarea for input. The data submitted would be sent to mysql db, I found that the textarea input cannot be stored properly to db if user press "enter" to make a new line...
I would like to replace the carriage return (/n/r) with a space, but it does not work..I also tried the nl2br function, but the carriage return still exists...
it messes up my csv file outputed by php.. so how can I remove the carriage return from the input?