I have a script that allows a user to upload an image to a specified dir on my site and holds a record of the file path/name in my DB. Once the image is uploaded, my page displays the image with a option to delete the image (if for example it got corrupted on upload etc.). I have got it so thet the DB is updated if the user clicks delete but I'm having a hard time deleting the actual image file. unlink() doesn't work because I havn't stored the image as a temporary file first (I think). I have the right permissions set on my folders - so I don't think it's that either. Does anyone know how to delete a file using PHP?