On my website, I have added the possibility for the users to upload their photos. I do have a back office from where I can delete some of the images that do not comply with the site policy.
However, I am deleting only the record from the database, not the actual image from the folder where it is uploaded.
Record in the database field look like 150068imagename.jpg for example. I do have added time stamp to each image to prevent duplicate images names.
What I would like to accomplish is not only to delete the record, but to delete and the actual file from the folder which is located on the server where the site is hosted. Anyone can tell me if and how can I accomplish this?