larry777 Posted February 1, 2007 Share Posted February 1, 2007 Hey there, I have a page that uploads images to a MySql db and it works great. However, you can only upload 1 image at a time. I need to be able to upload many images at a time, I'm sure this can be done. Does anyone have some code out there......?? ; ) Link to comment https://forums.phpfreaks.com/topic/36648-multiple-file-upload/ Share on other sites More sharing options...
SharkBait Posted February 1, 2007 Share Posted February 1, 2007 You can do a mutiple file upload just do multiple file inputs and in the name field of the inputs ad [] to the end of it So in my form I have something like this: [code] <?php for($i=1;$i<=5;$i++) { echo "<tr> <td><input type=\"file\" name=\"upload{$i}\" size=\"30\" /></td> </tr>\n"; } ?> ?> And then after submitting I loop through each $_FILES[] and do my validation moving etc.[/code] Link to comment https://forums.phpfreaks.com/topic/36648-multiple-file-upload/#findComment-174691 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.