Reply to Re: Multiple File Uploads Please

Re: Multiple File Uploads Please new!
by colin, 16 years, 10 months ago
Look in the FAQ, the question What about multiple uploads?.

Basically, first have the form and your upload code working for one image. For instance, the name of your upload field (INPUT type file) will be my_field.

Then, duplicate your upload field, keeping the same name for each copy, but adding [] to the name. So you will have 5 fields named my_field[].

Then, use the code as is the FAQ. That code first reformats the $_FILES array, into an array of elements that you can feed to the upload class one by one. Create your loop, and apply the same settings for each file if you wish to.

I don't have the time to write a proper tutorial now, but I will add it to my to-do list...Reply

Your reply

Name *
Email 
Title *
Text *
CAPTCHA image
Enter the code displayed on the image:
Click on the image to generate another one if it is hard to read it. The case is important