Sorry for being so dense, I did not add:
$Filename = $_POST['Filename'];
Which I am assuming is what you mean by 'not defining.'
And under that assumption, I tried the code with that added and I still got the ...
'Warning: fgetcsv() expects parameter 1 to be resource, boolean given... on line 30' error, which is this line:
while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
... and it gave that error, I am guessing, 1057 times. But it did insert the $variable data I tried to assign to the 4 records, but it inserted that data 1057 times.
So, it is caught in a loop and instead of creating 4 rows, created 1057. The good news is that it inserted the correct data with the exception of the email addresses (from the CSV, which is the row[0]).
I hope that makes sense, and I am trying to deduce where you are attempting to lead me without spelling it totally out for me.
Thanks,
Don