Does this code help? http://stackoverflow.com/questions/24895170/multiple-image-upload-php-form-with-one-input