I had a problem sending and storing textarea content, for which I could not find the right solution.
I have a form with a textarea field called a "description".
When I submit a form with multi-line text like
Line 1
Line 2
Line 3
It is stored in mySQL db with much newer lines. It becomes: -
Line 1
Line 2
Line 3
when i check db using phpmyadmin.
I tried both VARCHAR and TEXT types, same thing. What do I need to do to keep the contents of textarea accurate?
Corresponding lines codeignign aRow [$ strField] = strip_tags ($ this-> input-> post ($ strField)); $ this-> db-> insert ($ this-> strTable, $ aRow);
$ strField will be my textarea field, and insertion will be a CI function.
source share