Esto se hace con, Foreach y arrays :D
aca tenes algo para hacer varios imputos y tenerlos como array
Código PHP:
Ver original<script type="text/javascript">
<!--
num=0;
function crear(obj) {
num++;
fi = document.getElementById('fiel');
contenedor = document.createElement('div');
contenedor.id = 'div'+num;
fi.appendChild(contenedor);
ele = document.createElement('input');
ele.type = 'text';
ele.name = 'url[]'+num;
contenedor.appendChild(ele);
ele = document.createElement('input');
ele.type = 'button';
ele.value = 'Borrar';
ele.name = 'div'+num;
ele.onclick = function () {borrar(this.name)}
contenedor.appendChild(ele);
}
function borrar(obj) {
fi = document.getElementById('fiel');
fi.removeChild(document.getElementById(obj));
}
-->
</script>
<form action="" method="post"> <span id="fiel"></p>
<input onclick="crear(this)" type="button" value="Agregar Imagen!" />
<p></span></p>
<input type="submit" value="Generar Script!" />
</form>
Modificas para que agege para seleccionar imagenes y listo,
despues haces un foreach asi:
foreach($_POST['url'] as $m)
y listo, antes de $_POST['url'] utilizas $_FILES['url']['name']
EDITO!!!
encontre esto:
http://www.fyneworks.com/jquery/multiple-file-upload/