title: php file upload with a progressbar or number of percent
body: <p>I want to use a file upload progress. Can anybody give possible simple code 
  for showing upload progess bar. On the next code.
  There is file receiving file upload.php</p>
  
  <pre><code>&lt;?php
  if ($_FILES) {
      foreach ($_FILES as $k =&gt; $v) {
          if ($v["error"] &gt; 0) {
              echo "Error: " . $_FILES["file"]["error"] . "&lt;br&gt;";
          } else {
              echo "Upload: " . $v["name"] . "&lt;br&gt;";
              echo "Type: " . $v["type"] . "&lt;br&gt;";
              echo "Size: " . ($v["size"] / 1024) . " kB&lt;br&gt;";
              echo "Stored in: " . $v["tmp_name"]. "&lt;br&gt;&lt;br&gt;";
          }
      }
      return;
  }
  ?&gt;
  </code></pre>
  
  <p>And there is a html with file upload form.</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
      &lt;head&gt;
          &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
          &lt;title&gt;Upload&lt;/title&gt;
      &lt;/head&gt;
      &lt;body&gt;
          &lt;form action="upload.php" method="post" enctype="multipart/form-data"&gt;
              &lt;label for="f1"&gt;Filename:&lt;/label&gt;
              &lt;input type="file" name="f1" id="f1"&gt;&lt;br&gt;
              &lt;label for="f2"&gt;Filename:&lt;/label&gt;
              &lt;input type="file" name="f2" id="f2"&gt;&lt;br&gt;
              &lt;input type="submit" name="submit" value="Submit"&gt;
          &lt;/form&gt;
      &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Thank you</p>