#1
  1. No Profile Picture
    BeebleBrox
    Guest
    Devshed Newbie (0 - 499 posts)
    The html code below for uploading ONE file works. The variable $ADDIMAGE was set (checked using phpinfo() ):

    <INPUT NAME="ADDIMAGE" TYPE="file" VALUE="NONE">
    __________________________
    But a similar version for multiple uploads as documented in the php docu doesn't work. The array $ADDIMAGE was not set (checked using phpinfo() as well as actually checking that the temp upload dir was empty):

    <INPUT NAME="ADDIMAGE[]" TYPE="file" VALUE="NONE"> ...repeated 3 times

    Thnx for the help
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 1999
    Posts
    3
    Rep Power
    0
    I've never got the PHP upload feature to work with arrays.

    I've done something like this, that seems to work well:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    <INPUT TYPE=FILE NAME=file1 TYPE=FILE>
    <INPUT TYPE=FILE NAME=file2 TYPE=FILE>
    [/code]

    Then use something like:
    <BLOCKQUOTE><font size="1" face="Verdana,Arial,Helvetica">code:</font><HR><pre>
    $x=1;
    eval('$name = $file'.$x.'_name;');
    eval('$size = $file'.$x.'_size;');
    eval('$type = $file'.$x.'_type;');
    while($name)
    {
    whatever it is you want to do with $name, $type, and $size
    $x++;
    eval('$name = $file'.$x.'_name;');
    eval('$size = $file'.$x.'_size;');
    eval('$type = $file'.$x.'_type;');
    }
    [/code]

    [This message has been edited by SneakyDave (edited January 03, 2000).]

Similar Threads

  1. Replies: 1
    Last Post: February 8th, 2004, 01:59 PM
  2. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  3. Uploading multiple images using paths all in same .txt file?
    By MarlboroMan in forum Perl Programming
    Replies: 3
    Last Post: February 3rd, 2004, 05:34 PM
  4. How to read multiple line text file into a variable
    By gatewaycityca in forum Visual Basic Programming
    Replies: 4
    Last Post: January 29th, 2004, 12:26 PM
  5. php-sql file upload and download
    By mthroesch in forum PHP Development
    Replies: 0
    Last Post: January 28th, 2004, 01:56 AM

IMN logo majestic logo threadwatch logo seochat tools logo