I have a table in which every row has an option to upload a CSV file and a button to generate the report.
So every row has a file input with same name “file” and a button to submit the form. This file should be uploaded corresponding to the other values in the row. But when I was trying to upload the file on server side PHP unable to detects a uploaded file.
The current workaround that is working is creating a different form for every row.But isn’t there a way to get it done by one form? Is it good to have too many forms on a single HTML page?
I have a table in which every row has an option to upload a
Share
The way to do this is to turn the input name attributes into arrays with
[]:Then in PHP, access them as:
For file inputs, they’ll appear as an array in
$_FILES: