delete images

Advert test
ok PHP heads, I need some advice on this.

I am after adding new products to the database and also have some discontinued cause they are not available anymore.

To delete those products in one shot is easy through php, but i'll be left with a lot of images on the server that i don't use anymore.

in the database i have the path to both sized images (small, large), so by looping through them, i can get the path for it but i need to delete those from folders before the record itself.

any example or good reading material?
blacknight said:
You could possibly store the images directly in the DB?
you must know that is a bad ideea. images will take a lot a space in the database for no reason.
php has a function "unlink" which was just what i wanted. use within the loop function to delete data from the database i can also get the images deleted from the root folder.
somebody is in a good mood today.
maybe you don't care, but others do, and since i start working on websites i learned that is a bad ideea to store blob data in the database.


Staff member
Ah Louie - you don't need to be so touchy :)

PhpAdsNew stores images in its DB and I've been using that for ages