title: where is the mistake in my script?
body: <p>Friends, what is the problem in my php multifile uploading script? When running this script, it do nothing!! please help me to find out the mistake.
  Thanks in advance..Here is the html code..</p>
  
  <pre><code>    &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
      &lt;h3&gt;Upload your files here &lt;small&gt;(1GB max)&lt;/small&gt; ..&lt;/h3&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;input type="file" name="file" id="file"&gt;
      &lt;br&gt;
      &lt;input type="file" name="file" id="file"&gt;
      &lt;br&gt;
      &lt;br&gt;
      &lt;input type="submit" value="Upload file(s)" name="submit" id="submit"&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>And here is the "upload.php " file..</p>
  
  <pre><code>&lt;?php 
  if (isset($_POST['submit'])) { 
      //upload and rename file 
      $filename=$_FILES["file"]["name"];
      $tmp_filename=$_FILES["file"]["tmp_name"];
      $count_tmp_filename=count($tmp_filename);
      for($i = 0; $i &lt; $count_tmp_filename; $i++){ 
          $file_basename = substr($filename[$i], 0, strripos($filename[$i], '.'));
          $file_ext = substr($filename[$i], strripos($filename[$i], '.'));
          $filesize = $_FILES["file"]["size"][$i];
          $allowed_file_types = array('.doc','.docx','.rtf','.pdf','.jpg','.png','.mp4','.mp3');
          if (in_array($file_ext,$allowed_file_types) &amp;&amp; ($filesize &lt; 1000000000000)) { 
          // Rename file 
              $newfilename = 'droidsolve_'.$file_basename.$file_ext;
              if (file_exists("upload/" . $newfilename)) {
                  // file already exists 
                  error echo "You have already uploaded this file.";
              } else{ 
                  move_uploaded_file($_FILES[$tmp_filename[$i]], "upload/" . $newfilename);
                  echo "File uploaded successfully.";
              }
          }
      }
  } 
  ?&gt;
  </code></pre>