Reputation: 727
How can multi-upload images by html5
and js
and php
, Please give me a demo or example?
Without using a plugin
I try as this code in html and selected multi image:
<input type="file" name="upload[]" multiple="multiple">
But i give in php code just one image:
foreach( $_FILES['upload'] as $key => $all ){
foreach( $all as $i => $val ){
$new[$i][$key] = $val;
}
}
echo '<pre>';
print_r($new);
What do i do?
Upvotes: 1
Views: 10505
Reputation: 699
File upload with multiple file selection, drag&drop support, progress bars and preview images. File Upload Example
Upvotes: 1