Re: post files array and registered globals off

From: Date: Tue, 19 Nov 2002 11:30:21 +0000
Subject: Re: post files array and registered globals off
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-125068@lists.php.net to get a copy of this message
Sorry, now I noticed I forgot to add [$i]: if(!$_FILES['photo']['tmp_name'][$i]) break; Marek Kilimajer wrote:
you need to do it another way, e.g.: for($i=0; $i < MAX_FILES; $i++) { if(!$_FILES['photo']['tmp_name']) break; ... now work with the file. } electroteque wrote:
hi i need to do a foreach on post files array ie <input type=file name=photo[]> _REQUEST['photo'] or _POST['photo'] doesnt work only _FILES['photo'] works and if i do a foreach on this it gets the 5 associated array values for it not on the input value array ? say i had 2 input files i should get a count of 2 not 5 :|


« previous php.general (#125068) next »