pneudralics Posted November 13, 2008 Share Posted November 13, 2008 I want to have a delete link to delete some images. How would I make unlink() which can delete the file into an active link? Quote Link to comment https://forums.phpfreaks.com/topic/132624-how-do-i-make-unlink-into-an-active-link/ Share on other sites More sharing options...
JasonLewis Posted November 14, 2008 Share Posted November 14, 2008 How do you mean? You could make a link which has the name of the image as a query string, then perform some testing on the received string to ensure that the file exists. Once that has been completed you can use unlink() to remove the file. if(file_exists("files/" . $_GET['delete'])){ unlink("files/" . $_GET['delete']); } Just a simple example. Quote Link to comment https://forums.phpfreaks.com/topic/132624-how-do-i-make-unlink-into-an-active-link/#findComment-689956 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.