beh, devi inserire un altro input con type file:
per esempio:
Codice PHP:
<table>
<thead>
<tr>
<th>Lista Files</th>
</tr>
</thead>
<tbody id="MyBody">
<tr>
<td>File 1 : <input type="file" name="miofile[]" /></td>
</tr>
</tbody>
<tfoot>
<tr>
<td align="right">
[url="#"]Carica un altro file[/url]
</td>
<td align="center">
<input type="submit" value="Carica" />
</td>
</tr>
</tfoot>
</table>
In questa struttura inserirai una riga con una cella ed un input file al tbody.
Codice PHP:
var fileCounter = 1;
var addRowWithFile = function(){
fileCounter++;
var tr = document.createElement("tr");
var tbody = document.getElementById('MyBody');
tbody.appendChild(tr);
var td = document.createElement("td");
tr.appendChild(td);
td.appendChild(document.createTextNode("File "+fileCounter+" : "));
var inpt = document.createElement("input");
td.appendChild(inpt);
inpt.type = "file";
inpt.name = "miofile[]";
return false;
}
window.onload = function(){
document.getElementById('AddMore').onclick = addRowWithFile;
}
Poi bisogna vedere se il linguaggio server side che usi supporta l'utilizzo di array anche nel caricamento file...