note 7375 deleted from features.file-upload.multiple by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 20:39:10 +0000 |
| Subject: | note 7375 deleted from features.file-upload.multiple by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25400@lists.php.net to get a copy of this message | ||
Update on Uploading multiple files with PHP4
<p>
Example 18-2. Uploading multiple forms
<p>
<form action="file-upload.html" method="post"
enctype="multipart/form-data"><br>
Send these files:<br>
<input name="userfile[0][]" type="file"><br>
<input name="userfile[1][]" type="file"><br>
<input type="submit" value="Send files"><br>
</form>
<p>
When the above form is submitted, the arrays {$userfile[0][0]}, {$userfile[0][1]},
{$userfile[0][2]}, {$userfile[1][0]}, {$userfile[1][1]}, {$userfile[0][2]} will be formed.
<p>
{$userfile[?][0]} ==> original name of the file ("" if no file was sent)<br>
{$userfile[?][1]} ==> type of the file ("none" if no file was sent)<br>
{$userfile[?][2]} ==> temp name (and directory) of the file ("" if no file was sent)
<p>
For instance, assume that the filenames /home/test/review.html and /home/test/xwp.out are submitted.
In this case, {$userfile[0][0]} would contain the value review.html, and {$userfile[1][0]} would
contain the value xwp.out. Similarly, {$userfile[0][1]} would contain review.html's file type,
and so forth.