PHP Multiple File Upload

I am trying to create a form for users to fill out, I also want to let them attach files (can’t have a limit). My plan was to create a dir with a unique name for each form submission and put any attached files in there. I can do most of the stuff, the problem is handling the multiple files without adding multiple browse forms.

I was thinking something like they choose to add files and that information is stored, then when they submit the form those files are uploaded. Can anyone give me any help here or point me in the right direction. I don’t have a lot of experience with PHP yet but I’ve got the basics down.

you have to have multiple browes forms.

Let me elaborate. If you are uploading more than one file on a single page, you need to have multiple browse forms, but by that I mean:


<input type="file" name="file1">
<input type="file" name="file2">

// etc.... etc....

Thats what I was afraid of, and what I was trying to avoid. Thanks for the reply.

how about uploading zip files, and executng them upon delivery?

That would involve some intelligence on the users end. I may be able to do it with a form field for how many files to attach and open a new upload window based on that.

true

errrrrr it said it was to big to post this so here is a pHP file uploader script :slight_smile:

and use their auth tut but make sure you make it to where other won’t be able to ge tinto others!

http://www.phpfreaks.com/tutorials/40/0.php
http://www.phpfreaks.com/tutorials/78/0.php

Cheers
Raichu :flower: