Delete multiple images using php
<p>Hi Could you please help,
I'm building a website using php (my first time please be gentle)
within the site I upload an image tohe server, to a file called inventory_images,
on it's way itgets resized, so I end up with two images
img01.jpg and resized_img01.jpg
I use the small one for the frontend to speed loading, the large one I use for when the viewer wishes to see the full sized imaged.</p>

<p>I use the code below,</p>

<pre><code>// unlink the image from server
// Remove The Pic -------------------------------------------
    $pictodelete = ("../inventory_images/$id_to_delete.jpg");
    if (file_exists($pictodelete)) {
    unlink($pictodelete);
                }
    header("location: inventory_list.php"); 
     exit();
</code></pre>

<p>to remove the image from the inventory image file, how can I get the delete to also take out the resized file, so both are deleted.</p>
