I have a page that allows you to add images to the server.
As of course you are able to add them to the server you should be able to delete them.
Now the problem I have is that.
I cannot delete the folder if there are contents in it. (as it would be easier to delete all the contents in the folder along with the folder itself)
So I have to use UNLINK first and then RMDIR to delete the folder completely.
Now there are several files in that folder to be deleted and the name is stored in a database.
So the idea I had was to use the database to retrieve the name and then insert the name into a FILE EXISTS and then if that file exists use UNLINK and then once this has gone through 5 times (as maximum each person can have is 5 images) it then does RMDIR.
Now any help be greatly appericated!?!??! THANKYOU!!!
PS: Off to dinner so this might have been abit rushed, ill try fix it up later if it dont make sense!