how to do multiple file uploads

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

hondavtr
New php-forum User
New php-forum User
Posts: 4
Joined: Fri Aug 23, 2002 4:51 am

how to do multiple file uploads

Postby hondavtr » Sat Aug 24, 2002 2:41 am

I have the code to upload one file, or multiple files at once. I need to display a page where the user chooses a file to upload and the name is shown, then chooses another etc .... then at the end when the form is submitted all files are uploaded.

The problem is I don't know how to dynamically add the upload rows, as it needs to be limitless. :?:

The only thing I can think of is to add the file chosen to an array and actually resubmit the form to the same page after every file is chosen showing the names of all the files already in the array.

There has to be a better/easier way (if what I'm thinking of would even work).
Anyone have any idea?

DoppyNL

Postby DoppyNL » Sat Aug 24, 2002 3:44 am

You can also make the page to upload one file, let the user upload the file and when done with that file, let the user upload another (go back to the initial page).
You can also do that with more files at a time.

Keep in mind that uploading a lot of (large) files can take some time processing by the script, the browser may think something went wrong and timeout, PHP itself also, but you can set that timeout.

There is also a way to place form-variables directly in an array in php, the syntax for that escaped me for the moment.

Greetz Daan


Return to “PHP coding => General”

Who is online

Users browsing this forum: Google Feedfetcher and 2 guests