View Single Post
Old 12-07-2007, 07:50 PM   #2 (permalink)
sjaq
The Acquainted
 
sjaq's Avatar
 
Join Date: Nov 2007
Location: Netherlands
Posts: 113
Thanks: 11
sjaq is on a distinguished road
Default

You can use arrays for that:
HTML Code:
<p>File Attachment: <input type='file' name='fileatt[]' /></p>
<p>File Attachment: <input type='file' name='fileatt[]' /></p>
And then use foreach to do something with each individual file:
PHP Code:
foreach($_FILES['fileatt'] as $file) {
    if(
is_uploaded_file($file['tmp_name'])) {
        
// do something with the file
    
}

And maybe you can use some javascript to let people add ad many files as they want.. (I'm too lazy to make that for you )
sjaq is offline  
Reply With Quote
The Following User Says Thank You to sjaq For This Useful Post:
webxt (12-19-2009)