Replies: 1 comment
-
For debugging purposes, can you try replacing xhr.send(JSON.stringify({filename: name, filedata: data})); with xhr.send(JSON.stringify({filename: "test_file", filedata: "test_data"})); I'm thinking that since it is generating a file the PHP must be running to completion. Since it is empty with no file name there must be a problem with the $post_data variable. Perhaps there's something about the jsPsych data or the file name causing an issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. I'm using the exact same code from the website to send data to a remote server using Ajax and PHP. When I looked at the data folder after the experiment, though there is a new csv file, it doesn't have any name (just .csv) and any content (file size is 0). Could you look into the code and tell me what can be wrong? There's no error message both for js and php.
js file
php file
Beta Was this translation helpful? Give feedback.
All reactions