OK, got that bit.
Then, when I print $_FILES['userfile']['tmp_name'] I get this funny location/filename ... so I suppose the uploading to the server went OK, but I'm not sure (how do I find out if the file is there, as the documentation talks about a temporary file ..)
But I did this:
$query = "LOAD DATA LOW_PRIORITY INFILE '{$_FILES['userfile']['tmp_name']}' IGNORE INTO TABLE {$table}
FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '' ESCAPED BY '\' TERMINATED BY '\r\n' IGNORE 1 LINES
(naam, straat, hnr, toev, postcode, plaats, email, rembours)";
$result = mysql_query($query);
$affectedrows = mysql_affected_rows();
print $affectedrows'
But this gives me -1 meaning an error, which you cant specify :-(
What am I doing wrong? Wrong code? Can I retrieve that uploaded file and where is it (if it is existing)? Wrong reference to the uploaded file?
I saw in some other code that he used something like: $file_name_loaction = copy($name_of_the_submit, destination on server)
, and then used $file_name_location in the LOAD DATA INFILE
Joost