N
Nate12o6
Mabee you guys can help me with this.
I have a form with enctype="multipart/form-data" that has a textarea in
it as well as file upload. The text area is for a description of the
file.
If someone uses the enter key to make 2 lines in the text area when it
is submitted it is stored in mysql database with (i guess) a line break
\n? When i pull the data out of mysql to put back into the textarea i
use the javascript function setup_update_form('<?=$docrow[0]?>',
'<?=$docrow[2]?>', '<?=$docrow[3])?>'"> and when this renders to html
it put a new line in the call variable and makes it look something like
this:
setup_update_form('18', '20', 'This is the first line
and this is the second')
Obviously javascript doesnt like this. I have also tried
setup_update_form('<?=$docrow[0]?>', '<?=$docrow[2]?>',
'<?=str_replace("\n", "", $docrow[3])?>')"> but it does absolutely
nothing difrent.
I have also tried nl2br() but all that does it add a <br> and keep the
newline.
Any help is apreciated.
I have a form with enctype="multipart/form-data" that has a textarea in
it as well as file upload. The text area is for a description of the
file.
If someone uses the enter key to make 2 lines in the text area when it
is submitted it is stored in mysql database with (i guess) a line break
\n? When i pull the data out of mysql to put back into the textarea i
use the javascript function setup_update_form('<?=$docrow[0]?>',
'<?=$docrow[2]?>', '<?=$docrow[3])?>'"> and when this renders to html
it put a new line in the call variable and makes it look something like
this:
setup_update_form('18', '20', 'This is the first line
and this is the second')
Obviously javascript doesnt like this. I have also tried
setup_update_form('<?=$docrow[0]?>', '<?=$docrow[2]?>',
'<?=str_replace("\n", "", $docrow[3])?>')"> but it does absolutely
nothing difrent.
I have also tried nl2br() but all that does it add a <br> and keep the
newline.
Any help is apreciated.