I need to get source field name for input type file in Codeigniter. I have multiple input file with names generated based on id like "upload_file_12, upload_file_13, upload_file_(n)"
I know input file is using $_FILES, not $_POST, and that's why they not available in
$this->input->post(); # (which have input field name as array key)
But if i use $_FILES then I need to hard-code the name, or at least the prefix
$_FILES['upload_file_'.$i]
which i don't mind using, but is there any way to get the field name like using $this->input->post()?
Edit:
For example :
<input type='file' name='upload_file_12'>
I need to get the name='upload_file_12' part, which not in part of $_POST, but $_FILES.