[PHP-DEV] Bug #1951: file upload arrays don't work properly From: paul <email protected>
Date: 08/03/99

From: paul <email protected>
Operating system: Solaris 5.6
PHP version: 3.0.12
PHP Bug Type: Other
Bug description: file upload arrays don't work properly

okay, so I have this, which works:

========================================================================
<form enctype="multipart/form-data" method="post" action="<?php echo
$PHP_SELF ?>">
<p><input name="image" type="file">
<p><input type="submit" name="submit" value="Upload">
</form>

<?php
if ($submit) {
 echo "temp file: " .$image."<br>\n";
 echo "file name: " .$image_name."<br>\n";
 echo "file size: " .$image_size."<br>\n";
 echo "file type: " .$image_type."<br>\n";
}
?>
========================================================================

but this doesn't:

========================================================================
<form enctype="multipart/form-data" method="post" action="<?php echo
$PHP_SELF ?>">
<p><input name="image[1]" type="file">
<p><input type="submit" name="submit" value="Upload">
</form>

<?php

if ($submit) {
 echo "temp file: " .$image[1]."<br>\n";
 echo "file name: " .$image_name[1]."<br>\n";
 echo "file size: " .$image_size[1]."<br>\n";
 echo "file type: " .$image_type[1]."<br>\n";
}

?>
========================================================================

the only difference is image[1] instead of image.

-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: php-dev-unsubscribe <email protected>
For additional commands, e-mail: php-dev-help <email protected>
To contact the list administrators, e-mail: php-list-admin <email protected>