Forums
This topic is locked
Delete file when I delete entry
Posted 13 Oct 2003 05:17:45
1
has voted
13 Oct 2003 05:17:45 Dane Taylor posted:
I used the PHP Upload extension to upload the file into a dynamic directory and entry into a database. But now when i delete the entry I have to delete the file physically. Is there a way whn i delete a databse entry to deleta the file at the same time?Replies
Replied 13 Oct 2003 09:32:19
13 Oct 2003 09:32:19 Martha Graham replied:
Are you using the Pure PHP Upload add-on pack for the delete function?
Martha Graham
DMXzone manager
Martha Graham
DMXzone manager
Replied 20 Oct 2003 00:16:09
20 Oct 2003 00:16:09 Michael Guntenaar replied:
Sure use the unlink function <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
So just first run the query and after that unlink('file_path');
done <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>
So just first run the query and after that unlink('file_path');
done <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>