PHP Classes

Can't get file names

Recommend this page to a friend!

      Multiple file upload  >  All threads  >  Can't get file names  >  (Un) Subscribe thread alerts  
Subject:Can't get file names
Summary:Want to use your multi-file upload...
Messages:1
Author:Eric Guerin
Date:2006-09-18 00:24:57
 

  1. Can't get file names   Reply   Report abuse  
Picture of Eric Guerin Eric Guerin - 2006-09-18 00:24:57
I want to use your multi-file upload for a form, the form data goes into a mysql database, and the multi-file upload handles the file upload. But I can't seem to get the $_FILES["file"]["name"] from the $_FILES directive to add the data to the database.

I tried:
$files_uploaded = $_FILES["file"]["name"][1];
$files_uploaded += "," . $_FILES["file"]["name"][2];
$files_uploaded += "," . $_FILES["file"]["name"][3];

before the file upload script, and I also tried a
foreach ($_FILES as $value) {
foreach ($value as $value2) {

but I got a wierd unexpected T_AS message when trying to go through the array?

Any ideas how one gets a multifile upload file name and then uses this script?