[Solved] Multiple image upload using php [closed]


Mike here is a rough solution, I will not write the entire code here but I will explain the logic behind it.

You have 2 ways to go , one would be to name each and every field manually (which would mean that you are limited to the number of fields you add manually) or use an array. the only difference between these 2 methods are the way you “point” them to your php script. incase you use predefined name for every field then you can call them normally but if you use the array method then you would need to use a format like : $_FILES['FIELDNAME']['#ID'] (#ID starts from 0 to the number of fields that are created – 1, so you can do a while and go through them all).

So you have your fields in the html page, and in the php page you would go through them using a for loop. so you can use your current php code for the single upload and then go through each and every field and upload them one by one. here is an example :

for($i = 0; $i < count($_FILES['FILENAME']); $i++){

// USE YOUR UPLOAD SCRIPT HERE AND MAKE SURE YOU REPLACE YOUR CURRENT FILENAME to $_FILES['FILENAME'][$i]

}

2

solved Multiple image upload using php [closed]