I think that's because there are five keys for _$FILES['picname']. According to the manual:
---------------------------------------------------------------------- The contents of $_FILES from our example script is as follows. Note that this assumes the use of the file upload name userfile, as used in the example script above. $_FILES['userfile']['name'] The original name of the file on the client machine. $_FILES['userfile']['type'] The mime type of the file, if the browser provided this information. An example would be "image/gif". $_FILES['userfile']['size'] The size, in bytes, of the uploaded file. $_FILES['userfile']['tmp_name'] The temporary filename of the file in which the uploaded file was stored on the server. $_FILES['userfile']['error'] The error code associated with this file upload. ['error'] was added in PHP 4.2.0 ---------------------------------------------------------------------- Try changing your script to... each($_FILES) and see what happens. good luck. -philip On Wed, 16 Oct 2002, Jason Young wrote: > Without going into the process of how I came to do this, I just wanted > to throw out there that even if you only have 1 file input, it still > seems to loop 5 times... > > Is this something with my code... > > -- > $current = 0; > > while (list($key) = each($_FILES['picname'])) { > echo $current; > $current++; > } > -- > > ...or is there something freaky going on with the $_FILES array? > > -J > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php