I've written a small questionnaire in PHP. Several questions are to be completed in a text box. All data enters ok, but when I retrive the results with the following:
$query = 'SELECT * INTO OUTFILE "C:\\inetpub\\intranet\\results\\'.$qnamed.''.$filenamedate.'.csv" fields terminated by "," lines terminated by "\n" FROM '.$qnamed.'';
I encounter a problem. If the user completing the questionnaire has started a new line in the text box, then the file starts a new line every time a user did. Since I want to put this straight into excel (hence the .csv) it completly destroys the structure.
I have tried to adding $question1 = trim($question1); when they are completing the questionnaire but it hasn't helped.
Thanks for any help, Dan.