title: Getting file name when one is selected
body: <p>I've created a popup from which you can select a file to upload, that has the following structure:</p>
  
  <pre><code>&lt;div id = 'upload_container'&gt;
      &lt;span id = "close_btn"&gt;X&lt;/span&gt;
      &lt;!--Content--&gt;
      &lt;input type = 'file' id = 'upload_hidden' name = 'file_to_upload'&gt;
      &lt;p id = 'upload_container_text'&gt;Choose a file to upload&lt;/p&gt;
      &lt;p id = 'file_name'&gt;&lt;?php echo $file_name ?&gt;&lt;/p&gt;
      &lt;!-- // --&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>The way i trigger the window to select a file is by clicking the <em>"Choose a file to upload"</em> that will trigger the click event on the file input which is hidden.</p>
  
  <p>The thing i want to do now is to display the file name that was chosen, on the paragraph with the id <em>'file_name'</em> .
  What i tried is:</p>
  
  <pre><code>$file_name = "";
  if(isset($_FILES['file_to_upload'])){
      $file_name = $_FILES['file_to_upload']['name'];
  }
  </code></pre>
  
  <p>and to the paragraph i added:</p>
  
  <pre><code>&lt;p id = 'file_name'&gt;&lt;?php echo $file_name ?&gt;&lt;/p&gt;
  </code></pre>
  
  <p>but nothing happens. Any ideas ?</p>
  
  <p><strong>Thank you.</strong></p>