in the delete file behavior you are using the recordset to tell it which file to delete.
the problem with that is this:
on page load, the recordset uses the teamID querystring variable to filter the correct team record
when the form post, it reloads the page, this means the record is recreated. The action of the form does not pass the teamID url variable, so the recordset is empty.
since the recordset is empty, the delete behavior does not know which file to delete.
there are 2 ways to correct the problem:
1) add a hidden form element to the delete form and set the initial value for the hidden element to use the tamPicture column from the recordset. then in the delete file behavior, bind the file name to the hidden element.
2) change the code for the form tag:
<form class="DetailsPage DetailsPage Custom_CustomSharp" id="Details_Custom_CustomSharp" method="post" action="<?php echo (htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)); ?>">
to:
<form class="DetailsPage DetailsPage Custom_CustomSharp" id="Details_Custom_CustomSharp" method="post" action="<?php echo(htmlentities($_SERVER["PHP_SELF"], ENT_QUOTES)."?".$_SERVER["QUERY_STRING"]); ?>">