Accessing multiple images from a single file input

Discussion in 'PHP' started by abrakatabra83, Sep 5, 2011.

  1. #1
    Hi all,

    I am trying to upload multiple images from a single input, but i can't figure out how. My form is like this:

    <form action="test.php" method="post" enctype="multipart/form-data">
    <input type="file" name="images[]" multiple="multiple" />
    <input type="submit" value="Submit" />
    </form>

    How do i access these files from PHP?
     
    abrakatabra83, Sep 5, 2011 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    Rukbat, Sep 5, 2011 IP
  3. LarcenIII

    LarcenIII Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    LarcenIII, Sep 5, 2011 IP
  4. LarcenIII

    LarcenIII Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    With Rukbat's example, please implement some real security on top of that, because if you're ot careful, people could upload their own scripts to your server. But you already knew that right? I was just throwing it out there. That goes for ANY upload script though....
     
    LarcenIII, Sep 5, 2011 IP
  5. abrakatabra83

    abrakatabra83 Peon

    Messages:
    32
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Thanks for your replies, guys. Fortunately i found the way right after opening the thread, and it's something in the lines of rubkat's example.
     
    abrakatabra83, Sep 6, 2011 IP