From:             [EMAIL PROTECTED]
Operating system: WIN NT 4.0 - Apache
PHP version:      4.0.4pl1
PHP Bug Type:     *Programming Data Structures
Bug description:  file uploads with forms have problems

This code upload files and create a list of files uploaded. But sometimes when the 
form is sended (when try the 2nd or 3th round trip) all variables loose your values. 
the PHP.ini configuration is the default.

        if (is_uploaded_file($userfile))
                copy($userfile, "upload/".$userfile_name);
                $FileListName[] = $userfile_name;
                $FileListSize[] = $userfile_size;
<form Action="test1.php" Method="POST" ENCTYPE="MULTIPART/FORM-DATA" name="form1">
            echo "\n$FileListName[$i]\n";
                        echo "$FileListSize[$i]\n";
                echo count($FileListName);
                        echo "<input type=\"hidden\" name=\"FileListName[]\" 
                        echo "<input type=\"hidden\" name=\"FileListSize[]\" 
        <INPUT TYPE="hidden" name="MAX_FILE_SIZE" value="2000000">
        <input type="file" name="userfile" size="25" >
        <input type="submit" value="Agregar" name="B2">
Sorry for my english...

Dante Daniel Galli

Edit Bug report at:

PHP Development Mailing List <>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to