Line breaks dissapear when I write it to file
Posted: Thu May 20, 2004 3:17 pm
Hello all,
it sounds stupid, I know, but I cannot keep my line breaks from text of a TEXTAREA returned by a POST action. I write my data from the post to a txt file. But even before I write them I print the returned value (from the post) and the line breaks are all gone!!!! Is there not an equivilant value in URL coding to keep line breaks when posting from one form to another.
To give more details, my first page is a regular HTML used to get info from user. I then post this form to a php page that retrieves the values and writes it to a txt file and displays the info transmitted on the page. I have a link to another page that displays all info written to the txt file. All the info is there but the darn line breaks, especially the ones from a textarea input type on the HTML page. They don't follow to the php page.
I tried to set the set_magic_quotes_runtime function to 0, no effect. I tried to inpose a lenght on the fwrite function, that was no good. Using stripslashes function or not does nothing for me. Do I have to use strtok?
thanks ahead
Canole
it sounds stupid, I know, but I cannot keep my line breaks from text of a TEXTAREA returned by a POST action. I write my data from the post to a txt file. But even before I write them I print the returned value (from the post) and the line breaks are all gone!!!! Is there not an equivilant value in URL coding to keep line breaks when posting from one form to another.
To give more details, my first page is a regular HTML used to get info from user. I then post this form to a php page that retrieves the values and writes it to a txt file and displays the info transmitted on the page. I have a link to another page that displays all info written to the txt file. All the info is there but the darn line breaks, especially the ones from a textarea input type on the HTML page. They don't follow to the php page.
I tried to set the set_magic_quotes_runtime function to 0, no effect. I tried to inpose a lenght on the fwrite function, that was no good. Using stripslashes function or not does nothing for me. Do I have to use strtok?
thanks ahead
Canole