Welcome Guest, Not a member yet? Register   Sign In
Delete image permanently from upload folder.


I have a website & sometimes need to delete & update records from the site. Several records in many tables has image and we upload image to add a new record. But I am not sure whether should we delete the images permanently whenever delete the corresponding records.

Hamid Khan


suggestion...you could just flag the record/image in the table and not show it and if you change your mind later you could just delete all flagged records. I would only discourage keeping old images if hosting space becomes an issue.

table field for soft deletes

deleted tinyint(1) not null default 0,

deleted = 1 image is deleted do not show.
deleted = 0 image is ok so show it.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

@ php_rocs
@ InsiteFX

Thanks lot for your great suggestions.

Theme © iAndrew 2016 - Forum software by © MyBB