RE: [PHP] problem with "count" function ...

From: Date: Tue, 06 May 2003 19:32:29 +0000
Subject: RE: [PHP] problem with "count" function ...
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-146554@lists.php.net to get a copy of this message
For one, you are naming all of your file inputs the same thing so you will only get one no matter what. Second, $_FILES['userFile'] will be an array containing information about the uploaded file such as its temp location and its size. The array will always have 4 or 5 elements. Try reading the documentation on file uploads. http://us2.php.net/manual/en/features.file-upload.php I think if you change the names on your inputs count($_FILE) will accomplish what you want (unless you name them 'userfile[]'). > -----Original Message----- > From: Kenn Murrah [mailto:kennmurrah@nomoire.com] > Sent: Tuesday, May 06, 2003 12:12 PM > To: PHP > Subject: [PHP] problem with "count" function ... > > > Greetings. > > I'm sure I'm overlooking something simple, but I just can't see it ... > > I'm trying to upload multiple files via PHP, having built a forms page > with 10 > > <input type=file name='userFile'> > > statements ... and I'm trying to determine how many times to process my > upload handling loop with > > for ($i=0; $i<count($_FILES['userFile']); $i++) > > but no matter how many files I try to upload, I get a count of 4 ... > what am I doing wrong? > > thanks in advance for the help. > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#146554) next »