#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2000
    Posts
    44
    Rep Power
    15
    I'm wondering if there is a way to upload multiple files at the same time into a directory. Any help or ideas would be appreciated (and please be kind of descriptive, because I can be rather dense)
  2. #2
  3. Banned (not really)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 1999
    Location
    Brussels, Belgium
    Posts
    14,648
    Rep Power
    4493
    You'll have to provide an upload box for each file.

    <input type="file" name="myfile[]">

    you name them all exactly the same, with the [], that way you can referece them as an array on the php page that processes your form.

    for ($count=0;$count<count($myfile);$count++)
    {
    $copy_path = "/home/httpd/htdocs/images/". $myfile_name[$count];
    copy($myfile[$count],$copy_path);
    }

    I just wrote that code, didn't test it, but i've done things like this before. It also doesn't do any error checking and assumes all of the boxes will be filled in.

    ---John Holmes...

Similar Threads

  1. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 09:27 AM
  2. Replies: 1
    Last Post: February 8th, 2004, 02:59 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, 06: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, 01:26 PM
  5. Active perl multiple search when file is open
    By melinda in forum Perl Programming
    Replies: 3
    Last Post: January 28th, 2004, 05:29 AM

IMN logo majestic logo threadwatch logo seochat tools logo