Re: returning the index number part2

From: Date: Tue, 05 Jun 2007 22:54:04 +0000
Subject: Re: returning the index number part2
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-256141@lists.php.net to get a copy of this message
This will tell you how: <?php var_dump($_FILES); ?> On Tue, June 5, 2007 11:16 am, blueboy wrote: > > if I have an array of 3 images > > <table class="signup_table"> > <tr> > <td> 1.</td> > <td><input name="userfile[]" type="file"></td> > </tr> > <tr> > <td> 2.</td> > <td><input name="userfile[]" type="file"></td> > </tr> > <tr> > <td>3.</td> > <td><input name="userfile[]" type="file"> > </td> > </tr> > </table > > How do I access the filename? Like this? > > echo $fileName1 = $_FILES['userfile']['name'][0]; > echo $fileName2 = $_FILES['userfile']['name'][1]; > echo $fileName3 = $_FILES['userfile']['name'][2]; > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/browse/from/lynch Yeah, I get a buck. So?

« previous php.general (#256141) next »