title: How to pass the value of span in html to other page
body: <p>I want to pass the value of my span html which is the value, is from the javascript. It will count the words of the uploaded file. please help me guys for this.</p>
  
  <p>Heres my first page <strong>index.php</strong></p>
  
  <pre><code>&lt;form name="myform" action="values.php" method="post"&gt;
     &lt;input name="upload" type="file" id="upload" accept="text/plain" accesskey="u"&gt; UPLOAD A FILE
     &lt;span id="display_File_count" name="display_File_count"&gt;&lt;/span&gt; &lt;span&gt;Words&lt;/span&gt;
     &lt;input type="submit" value="Submit"&gt;
  &lt;/form&gt;
  
  &lt;script type="text/javascript"&gt;
  
      $('#upload').change( function(event) {
  
          var f = event.target.files[0];
          if (f) {
              var r = new FileReader();
  
              r.onload = function(e) { 
                  var contents = e.target.result;
                  var res = contents.split(" "); 
                  $("#display_File_count").text(res.length);
              }
              r.readAsText(f);
          }
      });
  
  &lt;/script&gt;
  </code></pre>
  
  <p>And heres the other page that will call the value <strong>values.php</strong></p>
  
  <pre><code>&lt;input type="text" name="count_upload" id="count_upload" value="&lt;?php echo $_POST["display_File_count"] ?&gt;" &gt;
  </code></pre>