Deleting multiple items with one delete checkbox
In my admin section on my edit record page I have a section that I can edit (ie: replace) a file that has been uploaded or delete that file. It works perfectly.
My question is this. Along with that file I have another field that is the Alt Text which is what the users see on the site instead of the file name. What I need to know is when the file is deleted, which deletes it from the db and the server can I delete the Alt text field from the same checkbox.
Delete code is below:
<?php
$WA_DeleteFileResult1 = false;
if((((isset($_POST["doc1del"]))?$_POST["doc1del"]:"") != "")){
$WA_DeleteFileResult1 = WA_FileAssist_DeleteFile("/documents/", "".($Recordset1->getColumnVal("document1")) ."");
}?>
Where the document itself is 'document1' the alt text is 'doc1AltText'
I just need it to empty that field when the file is deleted.
Thanks.