I want to upload multiple files so I
<input name="file[]" type="file"><br>
<input name="file[]" type="file"><br>
as is told in PHP docs. But an interesting thing happens, $HTTP_POST_FILES returns the following result in print_r:
Array ( [file] => Array ( [name] => Array ( [0] => types.html [1] => references.html ) [type] => Array ( [0] => text/html [1] => text/html ) [tmp_name] => Array ( [0] => /tmp/php7tsIWA [1] => /tmp/phpwFEs5J ) [size] => Array ( [0] => 32662 [1] => 18271 ) ) )
that is, my complete array and it sould be, but when I print_r $file see what happens:
Array ( [0] => /tmp/php7tsIWA [1] => /tmp/phpwFEs5J )
wich is just the temp names of my files !!! I don't know why is it happening. Any ideas ? I cannot access $file['name'][0] obviously as I'd like to and as is told in PHP documentation here http://www.php.net/manual/en/features.file-upload.multiple.php
I appreciate any help, thx.
Anderson