File uploads...
| From: | David Russell | Date: | Mon, 25 Nov 2002 08:33:09 +0000 |
| Subject: | File uploads... | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-125900@lists.php.net to get a copy of this message | ||
Hi all,
I am updating a site accounting for register_globals = off. I have a
page which allows for the uploading of a number of files. The page sends
these in an "array" of files.
The destination script used to have:
if ($AttachmentCount > 0) {
foreach($userfile as $key => $value) {
AddAttachment($BPFNo, $value, $userfile_name[$key],
$userfile_size[$key], $userfile_type[$key]);
}
}
Where attachmentcount was a variable which could be 0 (no uploads) or
more (counting the number of $userfile[] variables there should be.
AddAttachment is a function that actually saves the attachment into a
database.
How would I re-do this?
What I would preferably do is have the script AddAttachment for each
$_FILES[] there might be. If I need to change it from an array type
($userfile[]) in the calling script, I can easily do this.
Can someone help me?
Thanks
David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250
Fax: +2711 444-7256
e-mail: DavidR@BarloworldOptimus.com
web: www.BarloworldOptimus.com
Attachment: [application/x-pkcs7-signature] smime.p7s
Attachment: [application/x-pkcs7-signature] smime.p7s