So on my site users are allowed to upload images, i recently found this new html 5 feature that allows you to allows users to upload multiple files at once using "multiple="multiple"" but the promblem i dont know how to habdle uploading the images if they select more then one file
"multiple="multiple"" store the data in array so you just have to loop through it with foreach or something else.
When you upload a file the information regarding that file is stored in the $_FILES superglobal. Upon uploading multiple files, you may want to output the contents of the array to see what it contains: print_r( $_FILES ); PHP: To upload multple files on the server, you would have to loop through the array, and process each file. For example: foreach( $_FILES as $File ) { /* $File is an array. Keys: name => name of file sent by browser, type => type of file, tmp_name => location of file which is temporarily stored on the server, error => contains error code, size => size of file in bytes */ } PHP: You would perform various checks and then use the move_uploaded_file function to move the file to a more permanent location. }