I have two php scripts that are supposed to create a csv file containing values from my mysql database.
One script works, the other fails at writing the csv file.
I am not a programmer and hence cannot find the error. But I think the simplest solution is to copy/paste the working code from script #1 to the non-working file.
both scripts are attached.