mjgdunne Posted May 9, 2008 Share Posted May 9, 2008 Hi, I have images stored in a directory on the server. I have a delete function, which i have managed to get working, this deletes information held on a case from the database. Is there any way of deleting the images stored in the directory, the names of the images are stored in the database. $id = $_GET['pid']; mysql_query("DELETE FROM reff WHERE `pid`='$id'") or die(mysql_error()); Link to comment https://forums.phpfreaks.com/topic/104870-deleting-images/ Share on other sites More sharing options...
moselkady Posted May 9, 2008 Share Posted May 9, 2008 Use: unlink($filename); Just make sure that you have the proper path in $filename and that user www has write permissions on those files Link to comment https://forums.phpfreaks.com/topic/104870-deleting-images/#findComment-536759 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.