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

  • SEARCH
  • Home
  • 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 6586099
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T16:44:49+00:00 2026-05-25T16:44:49+00:00

I have this form : <form enctype=multipart/form-data action=upload.php method=POST> <input type=file name=photo[] /> <input

  • 0

I have this form :

<form enctype="multipart/form-data" action="upload.php" method="POST">
    <input type="file" name="photo[]" />
    <input type="file" name="photo[]" />
</form>

And I upload the files with php this way :

function upFiles($files){
    for($i = 0 ; $i < $files ; $i++){
        $FV_filename = $_FILES['photo']['name'][$i];
        $fileTYPE = substr($FV_filename , -4);
        move_uploaded_file($_FILES['photo']['tmp_name'][$i], uniqid().$fileTYPE);
    }
}

upFiles($_POST['howManyFiles']);

As you can see I get from the the client side how many files have been sent.
What I want to do is to check in the server side how many files have been received.
How can I do that? Is there any built in php function, if not then how to create one?

  • 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-25T16:44:50+00:00Added an answer on May 25, 2026 at 4:44 pm
    count( $_FILES['photo']['name'] );
    

    should work. Alternatively, just rewrite your for loop to a foreach:

    foreach ( $_FILES as $name => $file ) {
        var_dump( $file );
        // process file...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following form <form name=myForm id=myForm method=post enctype=multipart/form-data action=script.php> and this jQuery
I have this html form <form enctype=multipart/form-data action=upload.php method=POST> <textarea rows=5 cols=50 name=links id=links
I have this form: <form name=commentform id=commentform action=comment.php method=post enctype=multipart/form-data> Your Name: <textarea maxlength=60
I have an html input field, such as <form method=post action=process.php enctype=multipart/form-data> <div> <h3>Files:</h3>
I have the following form: <html> <body> <form action=upload_file.php method=post enctype=multipart/form-data> <label for=file>Filename:</label> <input
I have a form to upload image like below <form name=sample enctype=multipart/form-data action=index.php method=post
I have this code for uploading files on the server: <tr> <td> <form enctype=multipart/form-data
I'm having a slight problem. I have set my <input type=file> to onChange=this.form.submit() .
I am trying to upload a file from a php form. I have verified
I have a form that's calling a Post a .php file, which i though

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.