|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #11504 file uploads with forms have problems
Submitted: 2001-06-15 11:38 UTC Modified: 2001-06-17 13:54 UTC
From: dgalli at sda dot com dot ar Assigned:
Status: Closed Package: *Programming Data Structures
PHP Version: 4.0.4pl1 OS: WIN NT 4.0 - Apache
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: dgalli at sda dot com dot ar
New email:
PHP Version: OS:


 [2001-06-15 11:38 UTC] dgalli at sda dot com dot ar
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[]\" value=\"$FileListName[$j]\">";
			echo "<input type=\"hidden\" name=\"FileListSize[]\" value=\"$FileListSize[$j]\">";
	<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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2001-06-17 13:54 UTC]
I can't reproduce this. Please try with PHP 4.0.5

PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 02:01:30 2024 UTC