title: Deleting specific files in PHP
body: <p>So I've created a small administration panel with <code>php</code> that will upload files into a directory that will be shown on the main page.
  Now the thing is, how do I delete a file?
  I've already seen that people are using <code>Ajax</code> and <code>jQuery</code> to do this but I don't understand how to do this with a button.</p>
  
  <p>This is my function that generates the image and the delete button, but when someone click on the button it should delete the associated image, I don't get it how to pass the image path or something : </p>
  
  <pre><code>$dirname = "img_show/";
  $images = glob($dirname."*.{jpg,gif,png}",GLOB_BRACE);
  
  foreach($images as $image) {
       echo '&lt;img src="'.$image.'" width="25%" /&gt;&lt;br/&gt;';
       echo '&lt;form method="post"&gt;
              &lt;input type="submit" name="delete" value="Effacer" /&gt;
              &lt;/form&gt;';
   }
  </code></pre>