I have a form.When a user clicks on add a file. Two input fields are appended. One with the input name of the file to be uploaded and another with input field for the file itself
<form>
  <label>File 1</label>
  <input type="text" name="fileName[]"/>
  <input type="file" name="file[]"/>
  
  <label>File 2</label>
  <input type="text" name="fileName[]"/>
  <input type="file" name="file[]"/>
  .
  .
  .
  .
  
  <input type="submit" value="submit"/>
How do i get the corresponding file name and the file together for insertion Since the text field will be stored in $_POST variable and file in $_FILES