if ($_POST['save'] == 'save') {
    if ($IsHSCoach == 1) {
        $starr = array('fldAthlete_id' => $_REQUEST['fldAthleteID'], 'fldCoach_id' => $coach_id, 'fldLeaderShip' => $_POST['fldLeaderShip'], 'fldWork_Ethic' => $_POST['fldWork_Ethic'], 'fldPrimacy_Go_To_Guy' => $_POST['fldPrimacy_Go_To_Guy'], 'fldMental_Toughness' => $_POST['fldMental_Toughness'], 'fldComposure' => $_POST['fldComposure'], 'fldAwareness' => $_POST['fldAwareness'], 'fldInstincts' => $_POST['fldInstincts'], 'fldVision' => $_POST['fldVision'], 'fldConditioning' => $_POST['fldConditioning'], 'fldPhysical_Toughness' => $_POST['fldPhysical_Toughness'], 'fldTenacity' => $_POST['fldTenacity'], 'fldHustle' => $_POST['fldHustle'], 'fldStrength' => $_POST['fldStrength'], 'fldAddDate' => date("y-m-d"));
        //print_r($starr);
        $db->insertRec(TBL_RATING, $starr);
        //$msg = 'Rating successfully added.  <a href="javascript:refreshParent();">Close Window</a>';
        /*if ($_REQUEST["mode"] == "active") {
        			$Id = $_REQUEST['Id'];
        			$active_query_details = "update " . TBL_NETWORK . " set fldStatus = 'Active' where fldId='" . $Id . "'";
        			$activemsg = $db -> query($active_query_details);
        			if (isset($activemsg)) {
        				//$_REQUEST['msg'] = "Network Request Aapproved. User has been sent a nofication.";
        			}
        			//Send Email
        		}*/
        $func->getAverageRating($_REQUEST['fldAthleteID']);
        $msg = 'Rating Successfully!';
        ?>
			<script type="text/javascript">
			alert("<?php 
        echo $msg;
        ?>
");
			window.opener.location.reload(true);self.close();
			/*window.parent.location.href=window.parent.location.href;*/
			</script>
			<?php 
        exit;
        /*header("Location:RatingAthleteApprove.php?fldAthleteID=".$_REQUEST['fldAthleteID']."&mode=view&msg=$msg");*/
    }
}