My website allows members to upload a photo of themselves. Just one.
I spent an *enormous* amount of time writing a bullet-proof script to make sure that no one uploads something they shouldn't.
But now I have one problem that I want to be very careful about...
Currently, if a member uploads a replacement photo, my script uploads the new photo, but leaves the old one in the "uploads" directory.
I want to add on to my script to either 1.) Delete the old photo, or 2.) Move the old photo to a "delete" directory so that I know what needs to be cleaned out.
Can someone give some ideas on how to do this, and prevent hackers having the ability to tamper with or destroy other files on my website or web server?!