Tell me, please, how to process files uploaded through one input:

<input type='file' name='filedata' multiple> 

Google talks only about the processing of files uploaded by several inputs:

 <input type='file' name='filedata1'> <input type='file' name='filedata2'> <input type='file' name='filedata3'> 

UPD: the problem is that $ _FILES contains only the first file. print_r ($ _ FILES):

 Array ( [filedata] => Array ( [name] => sdfsdf.jpg [type] => image/jpeg [tmp_name] => Z:\tmp\php3943.tmp [error] => 0 [size] => 31815 ) ) 

    1 answer 1

    So you do not give the correct name, name='filedata[]' should be

    Note that the input of the file has been broken. It is required to process the multiple files.

    • I adore you! - sinedsem
    • the same garbage, if you want a lot of fields with the same name, if you give the name file [], then they will be passed as an array - thunder