title: how to get image content and name from folder and save in database without form
body: <p>Is there a way to take content and name of picture from folder and put it in to a database without using HTML form element. I've tried something like this</p>
  
  <pre><code>&lt;?php
  
  foreach(glob('*.png') as $img){
  
      print_r(file_get_contents($_FILES[$img]['tmp_name']));
  
      echo '&lt;img src="'.$img.'"&gt;';
  
  }
  </code></pre>
  
  <p>but when i tryed to take content the warning says: </p>
  
  <blockquote>
    <p>Warning: file_get_contents(): Filename cannot be empty in C:\xampp\htdocs\FirstPHPprojekt\pictest.php on line 5</p>
  </blockquote>