Can't the table name be the name of the csv file? or a temp file in the code? I have seen it done before but can't find the instance in which I had done this. I will look again harder to find it.
Ultimately I have a csv file that a user will upload then I can run queries on it. There are many different csv files slightly different in format, so I would then have to create a script to tailor each scenario? I think that means a new table for each file template?
How do I add a browse button for this?
Lets say I need to select the file can I use something like:
//get the csv file
$file = $_FILES[csv][tmp_name];
$handle = fopen($file,"r");
With a form like this:
Choose your file:I tried using the script as is and I always get the error:
'Please provide a file name'
I would really like to get this working so any additional information would be greatly appreciated