// test1.php
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Select</title>
</head>
<body>
<div id="uploadfiles" style="border:thin brown solid; border-radius:10px; width:250px; padding:10px; box-shadow:0px 0px 100px #333" align="center">
<form method="post" action="test2.php" enctype="multipart/form-data" style="position:relative;;" >
<p>Drop files here</p>
<input name="upload[]" type="file" multiple style="width:200px; height:150px; background-color:#EEE; border-radius:5px; padding:10px; border:thin brown dotted; box-shadow:0px 0px 20px #999">
<br><br>
<input name="Submit1" type="submit" value="submit">
</form>
</div>
</body>
</html>
// test2.php
<!DOCTYPE html>
<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
<title>Uploading...</title>
</head>
<body>
<?php
var_dump($_FILES['upload']);
$total = count($_FILES['upload']['name']);
$path = "";
// Loop through each file
for( $i=0 ; $i < $total ; $i++ ) {
$tmpFilePath = $_FILES['upload']['tmp_name'][$i];
// if ($_FILES['upload']['type'][$i] == 'application/x-zip-compressed')
// if ($_FILES['upload']['size'] < 30000) // 30Kbyte
$ext = pathinfo($tmpFilePath);
$newFilePath = $path.$ext['basename'];
$newFilePath = $_FILES['upload']['name'][$i];
echo $tmpFilePath." - ".$newFilePath."<br>";
if (move_uploaded_file($tmpFilePath, $newFilePath)) { echo("Done.<br>"); } else echo "ER";
}
?>
</body>
</html>