title: PHP : Uploading multiple photos using <input type='file'> with same name
body: <p>I m trying to upload multiple photos using</p>
  
  <pre><code>&lt;input type='file'&gt;
  </code></pre>
  
  <p>with same name to the input element like,</p>
  
  <pre><code>&lt;?php
  $remainGal  =   $maxGallery-$totalGallery;
  if($remainGal&gt;0){
  ?&gt;
  &lt;div class="businessSPGItems"&gt;
  &lt;form name="addBusinessGallery" method="post" action="businessservices.php#messageGallery" enctype="multipart/form-data"&gt;
  &lt;input type="hidden" name="businessID" value="&lt;?php echo $businessID;?&gt;" /&gt;
  &lt;?php
  for($i=0; $i&lt;$remainGal; $i++){
  ?&gt;
  &lt;input type="file" name="filePhotos[]" style="margin-top:5px;" tabindex="&lt;?php echo $i+5; ?&gt;" /&gt;&lt;br /&gt;
  &lt;?php
  }
  ?&gt;
  &lt;input type="submit" name="btnAddGallery" value="Add" style="margin-top:10px;" tabindex="&lt;?php echo $i+5; ?&gt;" /&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;?php
  }
  ?&gt;
  </code></pre>
  
  <p>But the problem is when i m taking the total count of the file element it always shows 5...
  ie.,</p>
  
  <pre><code>&lt;?php 
  $photos     =   $_FILES["filePhotos"];
  echo count($photos);
  ?&gt;
  </code></pre>
  
  <p>So i could not upload more than 5 photos at a time....
  i dont know i m doing the correct method..
  help please,,
  thanks...</p>