Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7580237
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T17:51:59+00:00 2026-05-30T17:51:59+00:00

I have a form which I am using to upload users photos but the

  • 0

I have a form which I am using to upload users photos but the problem is that I can upload 1 photos each time .like facebook I want my users to select multiple images in one shot. can anyone please guide. here is my present code.

<tr><td><input type="file" name="photos[]" /></td><td><input type="text" size="35" name="descriptions[]" /></td></tr>

and php is processing the uploaded images. can you please tell how should I do so that multiple images can be selected and uploaded in one shot

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T17:52:00+00:00Added an answer on May 30, 2026 at 5:52 pm

    first thing is you need to make your form multipart

    <form method="post" action="where_ever" enctype="multipart/form-data">
    

    And if you use HTML5 the next part is to create a named array

    <input type="file" accept='image/*' name="multiImageUpload[]" id="multiImageUpload" />
    <input type="file" accept='image/*' name="multiImageUpload[]" id="multiImageUpload" />
    <input type="file" accept='image/*' name="multiImageUpload[]" id="multiImageUpload" />
    

    This will put all files into a $_POST array called multiImageUpload.

    In order to allow a name to accept multiples in an array you need to use []
    at the back of name, name[] or images[] or files[], also using the HTML5
    property multiple multiple='' or multiple='multiple' will allow you
    to select multiple files at once form a single input.

    Here’s some working sample code to play around with

    The HTML

    <form method="post" action="upload.php" enctype="multipart/form-data">
      <input name='uploads[]' type="file" multiple=""/>
      <input type="submit" value="Send">
    </form>
    

    The PHP

    foreach ($_FILES['uploads']['name'] as $filename) {
        echo '<li>' . $filename . '</li>';
    }
    
    // full contents of $_FILS
    echo '<pre>';
    var_export($_FILES);
    echo '</pre>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which includes 3 textfields so users can upload files. They
I have an upload form where users can upload images that are currently being
I have a form which binds a model and a file upload using the
I have a webpage with a form, which looks kinda like this: @using (Html.BeginForm(MyAction,
I have a form that allow users to upload files, I however need to
I have a web application with an upload form where users can upload files.
I'm using Valum's AJAX uploader, which is quite nice. I have a form that
I'm developing a site using the CakePHP framework. I have a form which shows
I am using ASP.NET MVC 1.0. I have an ActionResult which receives a form
Im using c# .net , windows form application. I have a XML file which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.