|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
file input
just a quick query...
does anyone know a way of uploading multiple files, i just cant figure out how they do it, like the hotmail site lets you do when u attach files. also when i upload a file, does it only exist during the execution of the script that i pass it to? can someone explain teh procedure.. is it php or apache that puts the file in a temp dir or what? thanks for any comments ??? ![]() Last edited by stuie : August 27th, 2002 at 06:50 AM. |
|
#2
|
|||
|
|||
|
for multiple uploads you can either name each upload field yourself or create an array that prints our each file field, x times, then send all those files as an array, then do a foreach on it and grap the data
|
|
#3
|
|||
|
|||
|
yeah, just set the input name like for example this:
File 1: <input type="file" name="file[]"><br> File 2: <input type="file" name="file[]"><br> File 3: <input type="file" name="file[]"><br> PHP will then create an array like this: $_POST['file'][0] <- file 1 $_POST['file'][1] <- file 2 $_POST['file'][2] <- file 3 To make it "dynamic", you can use a foreach, like Ben said. foreach ($_POST['file']) { do that thang here ![]() } I have to run to school now
__________________
Best Regards, Håvard Lindset |
![]() |
| Viewing: Dev Articles Community Forums > Programming > General Programming Help > file input |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|