One file upload is fine if your users only need to upload things every once and a while, but what happens when that need grows? Can PHP accomidate more than one file upload in a form and still make it easy to handle and code around? Check out this new DevArticles piece to find out just how easy it is.
In Creating a Multi-File Upload Script in PHP, they walk you through a sample form with one file input element, showing you how this sample form would work. They then move into the point of the article, the multiple uploads page, followed by the script to handle it. The upload elements are contained inside a for loop, and their names are based on the counter variable. Then, when it comes time to process them, it's just a simple matter of making another for loop and pulling out the results.
Now, obviously, this simple script only copies the files around, but you could alter it to do just about anything you can imagine with it - even use GD to alter it and push it back out to the browser in another format...




