In your db.cgi file sub delete records, as I mentioned above you have to check that you entered this correctly, it looks like you have mismatched brackets.
Try using:
######### change for file upload mod ###########
if ($delete_list{$data[$db_key_pos]}) { # if this id is one we want to delete
$delete_list{$data[$db_key_pos]} = 0; # then mark it deleted and don't print it to the new database.
if ($db_upload) {
if (-e "$SAVE_DIRECTORY/$data[$db_key_pos]") {
opendir (GRAPHIC, "$SAVE_DIRECTORY/$data[$db_key_pos]") or &cgierr("unable to open directory in delete records: $SAVE_DIRECTORY/$data[$db_key_pos]. Reason: $!");
@files = readdir(GRAPHIC);
closedir (GRAPHIC);
foreach $file (@files) {
unlink ("$SAVE_DIRECTORY/$data[$db_key_pos]/$file");
}
rmdir "$SAVE_DIRECTORY/$data[$db_key_pos]";
}
}
}
else { $output .= $line . "\n";
}
########## end multiple file upload lines
}
foreach $key (keys %delete_list) {
Unoffical DBMan FAQ
http://creativecomputingweb.com/dbman/index.shtml/