Sarah
|
Posted: 09/19/2004, 9:25 PM |
|
I have use an upload utility to upload images to a file on the server. What is the code to delete a am image from a file when that record is deleted from the database?
TAI!
Sarah
|
|
|
Sarah
|
Posted: 09/19/2004, 9:31 PM |
|
I forgot to mention that I use an image called spacer.gif as a stand in if the record doesn't contain an image that I wouldn't want deleted.
|
|
|
Nicole
Posts: 586
|
Posted: 09/24/2004, 1:58 AM |
|
Sarah,
I suppose that you’re using CodeCharge. If you have a gotocode project in CC format you can get a sample code from there. Page name is Uploader.
In common the code could be:
if( get_param("action") == "delete" )
{
unlink("path_to_file and file_name");
}
_________________
Regards,
Nicole |
|
|
|