I tested this minimally,, it worked for me so it should work for you. it uploads the files prefixed with unix timestamp to avoid overwriting files that already exists: set $max = to the number of uploads you want to upload at once. remember to change the folder it uploads to and to do anything you need to do with the images before you move them. <? //TLN //$max is the number of uploads you wanna upload at once. $max = 10; if($max<=0){die("set max to an integer above 0");} if(ISSET($_FILES['file1'])){ #DO something with uploads...... #eg. for($i=1;$i<=$max;$i++){ $dir=basename($_FILES['file'.$i]['name']); if(move_uploaded_file($_FILES['file'.$i]['tmp_name'],$_SERVER['DOCUMENT_ROOT'] . "/imgfolder/".mktime(). $dir)){ echo "<P>Successfully uploaded file $i...</P>"; }else{ echo "<P>" . $_FILES['file'.$i]['tmp_name'] . " File $i Failed!</p>"; } } }else{ print("<form enctype=\"multipart/form-data\" name=\"uploadForm\" method=\"post\" action=\"" . $_SERVER['PHP_SELF'] . "\">"); for($i=1;$i<=$max;$i++){ print("<p>file $i: </p><input type=\"file\" name=\"file$i\"><BR>"); } print("<BR><input type=\"submit\" name=\"doaktion\" value=\"Do!\"></form>"); } ?> Code (markup):
TomN has good code. But it's more simply to use an Array file: <input type=\"file\" name=\"file[$i]\"> imo