class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
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
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...