Hay que hacer la tarea.
Código PHP:
<?php for ($i = 1; $i <= $_GET['cantidad']; $i++) { ?>
<input type="file" name="pictures[]"/><br>
<?php }?>
<input type="submit" value="Send" />
<input name="dale" type="hidden" id="dale">
</p>
</form>
<?php
if(isset($_POST['dale'])){
//places files into same dir as form resides
$carpeta = $_SERVER['DOCUMENT_ROOT']."/archivos/";
foreach ($_FILES["pictures"]["error"] as $key => $error) {
$carpeta.= $_FILES["pictures"]["name"][$key];
if ($error == UPLOAD_ERR_OK) {
echo"$error_codes[$error]";
move_uploaded_file($_FILES["pictures"]["tmp_name"][$key], $carpeta) or die("Problems with upload");
}
}
}
?>
Suerte