All the scripts I have found via Google search rely on some sort of screen that first asks the user how many files they need to upload and the upload script works based on that number.
But what if I don't want any limits, but want to allow the user to upload as many or as few as they want. How to go about this?
All I have for now is the form:
<form enctype="multipart/form-data" method="post" action="script.php">
<input id="my_file_element" type="file" name="myFile[]" >
<input type="submit" value="Upload!" name="submit">
</form>
EDIT
I think the way I phrased my question is causing some misunderstanding. I am not in need of some way to add more "input type = file" field elements. I am already using a javascript that enables the user to add more form fields by clicking a button, those other fields are identical to the 1st one posted above.
What I am asking this question for, is to know how to handle the actual upload of files to the server using a php script.