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

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?


David Russell
IT Support Manager
Barloworld Optimus (Pty) Ltd
Tel: +2711 444-7250 
Fax: +2711 444-7256
web: www.BarloworldOptimus.com

Attachment: smime.p7s
Description: application/pkcs7-signature

Reply via email to