function setGradeJ($total){ //grading function for Junior set if ($total<=39) { $grade = "F"; // Fail return $grade; }elseif ($total<=59) { $grade = "D"; // Pass return $grade; }elseif ($total<=69) { $grade = "C"; // Good return $grade; } elseif ($total<=79) { $grade = "B"; // V.Good return $grade; }elseif ($total<=100) { $grade = "A"; // Exellent return $grade; }else{ $grade = "error"; return $grade; } } function setGradeS($total){ //grading function for senior set if ($total<=39) { $grade = "F"; //FAIL return $grade; }elseif ($total<=44) { $grade = "D"; //Pass return $grade; }elseif ($total<=49) { $grade = "C"; //Credit return $grade; }elseif ($total<=59) { $grade = "B"; // Good return $grade; }elseif ($total<=69) { $grade = "B"; // V.Good return $grade; }elseif ($total<=100) { $grade = "A"; // Exellent return $grade; }else{ $grade = "error"; return $grade; } } function setRemarkJ($total){ //grading function for Junior set if ($total<=39) { $remark = "Fail"; return $remark; }elseif ($total<=59) { $remark = "Pass"; return $remark; }elseif ($total<=69) { $remark = "Good"; return $remark; }elseif ($total<=79) { $remark = "V.Good"; return $remark; }elseif ($total<=100) { $remark = "Excellent"; return $remark; }else{ $remark = "error"; return $remark; } } function setRemarkS($total){ //grading function for senior set if ($total<=39) { $remark = "Fail"; return $remark; }elseif ($total<=44) { $remark = "Pass"; return $remark; }elseif ($total<=49) { $remark = "Credit"; return $remark; }elseif ($total<=59) { $remark = "Good"; return $remark; }elseif ($total<=69) { $remark = "V.Good"; return $remark; }elseif ($total<=100) { $remark = "Excellent"; return $remark; }else{ $remark = "error"; return $remark; } }