PHP multiple file upload

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
osyris
Forum Newbie
Posts: 1
Joined: Mon Dec 08, 2008 2:02 pm

PHP multiple file upload

Post by osyris »

Hi,
I have a php app that needs to upload multilple files.

The user uses an HTML File Input to browse for the file and select it, but instead of uploading right away, I need to store it in a multiple select. Once all the files have been added to the multiple select, the user clicks "upload" and all the files are uploaded to the server. The only problem I am having is how to upload the files in the multiple select. I can get the file names there, but they are not uploading.

Any help, or requests for more info on the problem?
watson516
Forum Contributor
Posts: 198
Joined: Mon Mar 20, 2006 9:19 pm
Location: Hamilton, Ontario

Re: PHP multiple file upload

Post by watson516 »

As far as I'm aware, each file needs a file input to get uploaded.

So, if you want to list the files selected by the user to upload, you would need to hide the current file input and generate a new one in its place. You would then just add the file's name to the select input. That would be best done via javascript I would think.
Post Reply