<?php
      $img1 = "$_GET[image1]";
      $img2 = "$_GET[image2]";
      $img3 = "$_GET[image3]";
      $img4 = "$_GET[image4]";
      $img5 = "$_GET[image5]";
      $img6 = "$_GET[image6]";   

      echo $_GET['image1']."<br>";
      echo $_GET['image2']."<br>";
      echo $_GET['image3']."<br>";
      echo $_GET['image4']."<br>";
      echo $_GET['image5']."<br>";
      echo $_GET['image6']."<br>";
?>

<?php $path="images/$img1"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img1"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span> <br> ";?>

<?php $path="images/$img2"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img2"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span> <br> ";?>

<?php $path="images/$img3"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img3"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span> <br> ";?>

<?php $path="images/$img4"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img4"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span> <br> ";?>

<?php $path="images/$img5"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img5"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span> <br> ";?>

<?php $path="images/$img6"; if(unlink($path)) echo ".'$path'. <span style='color:red;'> file Deleted </span> <br> ";?>
<?php $path="images/thumbs/$img6"; if(unlink($path)) echo ".'$path'. <span style='color:limegreen;'> file Deleted </span>";?>  

<html>
<head>
<title>DELETE FILE USE INPUT STYLE</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0"> 
<meta http-equiv="refresh" content="500; url=Get_Post_MethodUsed.php">

<style>
body{font-family:arial; max-width:450px; margin:-130px auto; line-height:22px; color:#8c8c8c;}
a:link, a:visited, a:active{color:blue;}
a:hover{color:red;}
</style>


</head>
<body>
<br>  
<p>Type images name and delete it from folder <br> used unlink method <a href="DeleteFile_use_Input_Unlink.php"><b> Refresh </b></a></p>
<table style="border-spacing: 5px;">
    <tr>
<td valign="top" style="background:#ccffff; padding:11px;"><center> Type Image Name</center>
 <form action = "<?php $_PHP_SELF ?>" method = "GET">
         1: <input type = "text" name = "image1" style="margin:3px;" /><br>
         2: <input type = "text" name = "image2" style="margin:3px;" /><br>
         3: <input type = "text" name = "image3" style="margin:3px;" /><br>
         4: <input type = "text" name = "image4" style="margin:3px;" /><br>
         5: <input type = "text" name = "image5" style="margin:3px;" /><br>
         6: <input type = "text" name = "image6" style="margin:3px;" /><br>
         
         <center><input type = "submit" style="font-size:20px; cursor:pointer; color:red; font-weight:bold;margin-top:5px;"/></center>
      </form>
      <center> Submit and delete thumbs and images from the folder <br><br>
      <a href='images/'><b> IMAGE FOLDER </b></a> <br><br> <a href='upload.php'><b> UPLOAD FILES </b></a> </center>  <br>          
        </td>
        <td valign="top" style="background:#ccffcc; padding:11px;">
            Images Names in folder
 <?php  
$dir = "images/"; 
$sd = scandir($dir,1);
echo "<ol>";
foreach ($sd as $value) {
  echo "<li> <a href='images/$value'> $value </a></li>";
}
echo "</ol>";
?>            

</tr>
</table>




<br><br>

<br><br>
</body>
</html>