I would like a DHTML (JavaScript) file combined with PHP to upload 0 or more files. I would like it to work like Gmail's standard view compose mail attachment. Here are the basic steps:
1. Click "Attach a file" link
2. In place of the above link add a text box & browse button to browse for a local file. Below this add a link that says "Attach another file". Next to it, add a link that says "remove".
3. If they clidk the "Attach another file" link, add another file browser. If the click the remove link, remove the associated file browser.
4. Upload the files on submit using PHP.
I've attached some screenshots for more clarification. Remember, this needs to be dynamic - client side using JavaScript. The only server side code (PHP) should be upon submission.