How can I get the html form name from php with multiple file uploads? -


if handle file uploads:

if ($_files) {     foreach ($_files $file) {         //...handle upload process     } } 

is there way can key of file? in:

<input type="file" name="myfile" /> 

i want know file coming "myfile".

edit: obvious solution turns out be:

foreach($_files $key => $file) {      $input_name = $key;     // handle upload.  } 

if input name in form myfile, in $_files array as:

$_files['myfile'] 

so can do:

foreach ($_files $inputname => $fileinfo) {  } 

check out handling file uploads more info.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -