Deleting file and filename
I have a profile update page within which clients can update details about themselves - one of the elements is a photo. I have the page updating fine if they update the photo or any of the text. However, I've now placed a 'delete photo' button beside the existing photo and assigned a 'delete file' action to it. This does indeed remove the file from the server, but I'm unable to remove the filename from the appropriate database field.
Is there a way I can do this other than displaying an additional text field to show the current file name and requiring them to hit the 'delete photo' button, then remove the text displaying in that text field and then hitting the 'Update' button?
Many thanks in advance.