[b]Here's the code I've got for deleting a record in the MySQL database as well as the image associated with it on the server. The portion that deletes from the database is working perfectly, but I can't get it to delete the image off the server. This is a picture gallery I've created for a client. Getting it to delete the actual image is the last thing keeping me from finishing the project. All and any help is appreciated.[/b] [!--coloro:#CC0000--][span style=\"color:#CC0000\"][!--/coloro--]<? $db_user_name = "*****"; $db_database_name = "****"; $db_password = "****"; $picture_id = $_GET['picture_id']; $picture_name = $_GET['picture_name']; $picture_url = $title . '.' . $_GET['picture_url']; mysql_connect( 'localhost', $db_user_name, $db_password) or die('<br>Failed connect: ' . mysql_error()); mysql_select_db($db_database_name) or die('<br>Failed database: ' . mysql_error()); mysql_query("DELETE FROM pg_gallery WHERE picture_id = $picture_id") or die('<br>Failed query: ' . mysql_error()); mysql_close(); unlink('../../images/gallery/'.$picture_url); echo 'File removed successfully.'; ?>[!--colorc--][/span][!--/colorc--]