


<html lang="en">

<head>
    <!-- Google tag (gtag.js) -->
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-GQPGJ4YN30"></script>
    <script>
        window.dataLayer = window.dataLayer || [];

        function gtag() {
            dataLayer.push(arguments);
        }
        gtag('js', new Date());

        gtag('config', 'G-GQPGJ4YN30');
    </script>


    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Application Form</title>
    <!-- using online links -->
    <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">

    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.2/css/all.css" integrity="sha384-oS3vJWv+0UjzBfQzYUhtDYW+Pj2yciDJxpsK1OYPAYjqT085Qq/1cq5FLXAZQ7Ay" crossorigin="anonymous">

    <link rel="stylesheet" href="//malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.min.css">

    <!-- CSS only -->
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.0/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-KyZXEAg3QhqLMpG8r+8fhAXLRk2vvoC2f3B09zVXn8CA5QIVfZOJ3BCsw2P0p/We" crossorigin="anonymous">


    <script src="//cdn.jsdelivr.net/npm/sweetalert2@11"></script>


    <style>
        span {
            font-size: 12px;
        }


        /* Chrome, Safari, Edge, Opera */
        input::-webkit-outer-spin-button,
        input::-webkit-inner-spin-button {
            -webkit-appearance: none;
            margin: 0;
        }

        /* Firefox */
        input[type=number] {
            -moz-appearance: textfield;
        }
    </style>

</head>

<body>


<?php
$capchaval = substr(str_shuffle("1234abcdefghijkmnpqrABCDEFGHIJKL123456789stvwxyzMNPQRSTVWXYZ56789"), 0, 8);
include "connection.php";

$p_APP_ROLL_NO = "";
$p_APP_CAT = "";
$STD_NAME = "";
$STD_MOBILE_NO = "";
$RG_CODE = "";
$RG_SECT = "";
$F_NAME = "";
$F_MOBILE_NO = "";
$M_NAME = "";
$M_MOBILE_NO = "";
$SCHOOL_NAME = "";
$BOARD_CODE = "";
$EXAM_ROLL_NO = "";
$REG_NO = "";
$SESSION_NO = "";
$EXAM_YEAR = "";
$p_LOC_CODE = "";
$p_SSC_GR_CODE = "";
$p_GP_BANG = "";
$p_GP_ENG = "";
$p_GP_RELI = "";
$p_GP_MATH = "";
$p_GP_PHY = "";
$p_GP_CHE = "";
$p_GP_BIO = "";
$p_GP_HMATH = "";
$p_GP_SCI = "";
$p_GP_ACC = "";
$p_ADD_SUB_NAME = "";
$p_GP_ADD_SUB = "";
$SSC_GPA = "";
$TOTAL_APLUS = "";
$SSC_MARKS = "";
$p_SSC_VERSION = "";
$SMS_MOBILE_NO = "";
$p_OTP = "";

$sql = "SELECT * FROM AD_RELIGION_MST";
$parse = ociparse($conn, $sql);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $religion[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);


$sql1 = "SELECT * FROM AD_BOARD";
$parse = ociparse($conn, $sql1);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $board[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);



//$sql2 = "SELECT * FROM AD_SSC_GR where gr_code in(select gr_code from AD_APP_SSC_GR_MAP where cat_code='1')";
$sql2 = "SELECT * FROM AD_SSC_GR";
$parse = ociparse($conn, $sql2);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $ssc_group[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);


$sql3 = "SELECT * FROM AD_CAT";
$parse = ociparse($conn, $sql3);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $subject[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);


$sql4 = "SELECT * FROM AD_SCHOOL_LOC";
$parse = ociparse($conn, $sql4);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $school_location[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);



$sql5 = "SELECT * FROM AD_VERSION";
$parse = ociparse($conn, $sql5);
oci_execute($parse);

while ($row = oci_fetch_assoc($parse)) {
    $version[] = $row;
}

// var_dump($division);
// echo count($division);
oci_free_statement($parse);






if (isset($_POST['submit'])) {

    // image upload starts 

    /*$name = $_FILES['file']['name']; 
    $size = $_FILES['file']['size']; 
    $type = $_FILES['file']['type']; 
    $tmp_name = $_FILES['file']['tmp_name']; 

    if(isset($name)){ 
      if(!empty($name)){ 
          $target_path = basename( $_FILES['file']['name']);
          if(move_uploaded_file($_FILES['file']['tmp_name'], $target_path)) {
            //  echo "The file ".  basename( $_FILES['file']['name'])." has been uploaded";

             $im = file_get_contents($_FILES['file']['name']);
             print $imdata = base64_encode($im);
          }
        }else{ 
            echo 'Please choose a File'; 
        } 
    }*/
    $imdata = $_POST['basedata'];



    // $p_APP_ROLL_NO = 0;
    $p_APP_CAT = $_POST['ad_cat'];
    // if($p_APP_CAT=='1'){
    //     $p_APP_ROLL_NO='SB_ROLL.nextval';
    // }else if($p_APP_CAT=='2'){
    //     $p_APP_ROLL_NO='SE_ROLL.nextval';
    // }else if($p_APP_CAT=='3'){
    //     $p_APP_ROLL_NO='HA_ROLL.nextval';
    // }else if($p_APP_CAT=='4'){
    //     $p_APP_ROLL_NO='BA_ROLL.nextval';
    // }
    print $p_APP_ROLL_NO;
    $STD_NAME = $_POST['full_name'];
    $STD_MOBILE_NO = $_POST['stu_mobile'];
    // echo "$STD_MOBILE_NO";
    $RG_CODE = $_POST['religion_1'];
    $RG_SECT = $_POST['religious_sect'];
    $F_NAME = $_POST['fathers_name'];
    $F_MOBILE_NO = $_POST['fathers_mobile'];
    $M_NAME = $_POST['mothers_name'];
    $M_MOBILE_NO = $_POST['mothers_mobile'];
    $SCHOOL_NAME = $_POST['school_name'];
    $BOARD_CODE = $_POST['board'];
    $EXAM_ROLL_NO = $_POST['exam_roll'];
    $REG_NO = $_POST['reg_number'];
    $SESSION_NO = $_POST['session'];
    $EXAM_YEAR = $_POST['exam_year'];
    $p_LOC_CODE = $_POST['school_location'];
    $p_SSC_GR_CODE = $_POST['ssc_group'];
    // echo "$p_SSC_GR_CODE";
    //  $p_SSC_GR_CODE = '';
    if ($p_SSC_GR_CODE === '1') {
        $p_GP_BANG = $_POST['s_bangla'];
        $p_GP_ENG = $_POST['s_english'];
        // $p_GP_RELI = $_POST['s_religion'];
        $p_GP_MATH = $_POST['s_mathematics'];
        $p_ADD_SUB_NAME = $_POST['s_addsub'];
        $p_GP_ADD_SUB = $_POST['s_grade_point'];
        $EXAM_SUB_NAME1 = $_POST['sb_sub_name_1'];
        $GP_EXAM_SUB31 = $_POST['sb_sub_mark_1'];
        $EXAM_SUB_NAME2 = $_POST['sb_sub_name_2'];
        $GP_EXAM_SUB2 = $_POST['sb_sub_mark_2'];
        $EXAM_SUB_NAME3 = $_POST['sb_sub_name_3'];
        $GP_EXAM_SUB3 = $_POST['sb_sub_mark_3'];
        $EXAM_SUB_NAME4 = $_POST['sb_sub_name_4'];
        $GP_EXAM_SUB4 = $_POST['sb_sub_mark_4'];
        $SSC_GPA = $_POST['s_ssc_gpa'];
        $TOTAL_APLUS = $_POST['s_total_aplus'];
        // $TOTAL_MARKS = $_POST['s_total_marks'];
    } else if ($p_SSC_GR_CODE === '2') {
        $p_GP_BANG = $_POST['h_bangla'];
        $p_GP_ENG = $_POST['h_english'];
        // $p_GP_RELI = $_POST['h_religion'];
        $p_GP_MATH = $_POST['h_mathematics'];
        $p_GP_SCI = $_POST['h_science'];
        $p_ADD_SUB_NAME = $_POST['h_addsub'];
        $p_GP_ADD_SUB = $_POST['h_grade_point'];

        $EXAM_SUB_NAME1 = $_POST['h_sub_name_1'];
        $GP_EXAM_SUB31 = $_POST['h_sub_mark_1'];
        $EXAM_SUB_NAME2 = $_POST['h_sub_name_2'];
        $GP_EXAM_SUB2 = $_POST['h_sub_mark_2'];
        $EXAM_SUB_NAME3 = $_POST['h_sub_name_3'];
        $GP_EXAM_SUB3 = $_POST['h_sub_mark_3'];
        $EXAM_SUB_NAME4 = $_POST['h_sub_name_4'];
        $GP_EXAM_SUB4 = $_POST['h_sub_mark_4'];
        $SSC_GPA = $_POST['h_ssc_gpa'];
        $TOTAL_APLUS = $_POST['h_total_aplus'];
        // $TOTAL_MARKS = $_POST['h_total_marks'];
    } else if ($p_SSC_GR_CODE === '3') {
        $p_GP_BANG = $_POST['g_bangla'];
        $p_GP_ENG = $_POST['g_english'];
        $p_GP_MATH = $_POST['g_mathematics'];
        $p_ADD_SUB_NAME = $_POST['g_addsub'];
        $p_GP_ADD_SUB = $_POST['g_grade_point'];


        $EXAM_SUB_NAME1 = $_POST['g_sub_name_1'];
        $GP_EXAM_SUB31 = $_POST['g_sub_mark_1'];
        $EXAM_SUB_NAME2 = $_POST['g_sub_name_2'];
        $GP_EXAM_SUB2 = $_POST['g_sub_mark_2'];
        $EXAM_SUB_NAME3 = $_POST['g_sub_name_3'];
        $GP_EXAM_SUB3 = $_POST['g_sub_mark_3'];
        $EXAM_SUB_NAME4 = $_POST['g_sub_name_4'];
        $GP_EXAM_SUB4 = $_POST['g_sub_mark_4'];
        $SSC_GPA = $_POST['g_ssc_gpa'];
        $TOTAL_APLUS = $_POST['g_total_aplus'];
        // $TOTAL_MARKS = $_POST['g_total_marks'];
    } else if ($p_SSC_GR_CODE === '4') {
        $p_GP_BANG = $_POST['bs_bangla'];
        $p_GP_ENG = $_POST['bs_english'];
        // $p_GP_RELI = $_POST['bs_religion'];
        $p_GP_MATH = $_POST['bs_mathematics'];
        $p_GP_SCI = $_POST['bs_science'];
        $p_ADD_SUB_NAME = $_POST['bs_addsub'];
        $p_GP_ADD_SUB = $_POST['bs_grade_point'];


        $EXAM_SUB_NAME1 = $_POST['bs_sub_name_1'];
        $GP_EXAM_SUB31 = $_POST['bs_sub_mark_1'];
        $EXAM_SUB_NAME2 = $_POST['bs_sub_name_2'];
        $GP_EXAM_SUB2 = $_POST['bs_sub_mark_2'];
        $EXAM_SUB_NAME3 = $_POST['bs_sub_name_3'];
        $GP_EXAM_SUB3 = $_POST['bs_sub_mark_3'];
        $EXAM_SUB_NAME4 = $_POST['bs_sub_name_4'];
        $GP_EXAM_SUB4 = $_POST['bs_sub_mark_4'];

        $SSC_GPA = $_POST['bs_ssc_gpa'];
        $TOTAL_APLUS = $_POST['bs_total_aplus'];
        // $TOTAL_MARKS = $_POST['bs_total_marks'];
    }




    $p_GP_PHY = $_POST['physics'];
    $p_GP_CHE = $_POST['chemistry'];
    $p_GP_BIO = $_POST['biology'];
    $p_GP_HMATH = $_POST['highermath'];
    // $p_GP_SCI = $_POST['science'];
    $p_GP_ECO = $_POST['economics'];
    $p_GP_CIVICS = $_POST['civics'];
    $p_GP_GEO = $_POST['geography'];
    $p_GP_QURAN = $_POST['quran'];
    $p_GP_ARABIC = $_POST['hadith'];
    $p_GP_AQAID = $_POST['aqaid'];
    $p_GP_ISLAM = $_POST['islamic_history'];
    $p_GP_ACC = $_POST['accounting'];
    $p_GP_FIN = $_POST['finance'];
    $p_GP_BUSINT = $_POST['business_etre'];


    // $SSC_GPA = $_POST['ssc_gpa'];
    // $TOTAL_APLUS = $_POST['total_aplus'];
    // $SSC_MARKS = 0;
    $p_SSC_VERSION = $_POST['version_ssc'];
    $SMS_MOBILE_NO = $_POST['massage_mobile'];
    $p_OTP = mt_rand(100000, 999999);
    // $p_OTP = 0;

    $p_TB_EXAM_ROLL_NO = $_POST['twin_ssc_roll'];
    $p_TB_REG_NO = $_POST['twin_ssc_regi'];
    $p_APP_MODE = "PHP1";




    $returnval = 0;
    //     $stid = oci_parse($conn, "begin PKG_AD_APP.DPD_AD_APP_INSERT(:o_status,:p_APP_ROLL_NO,:p_APP_CAT,:imdata,:STD_NAME,:STD_MOBILE_NO,:RG_CODE,:RG_SECT,:F_NAME,:F_MOBILE_NO,:M_NAME,:M_MOBILE_NO,:SCHOOL_NAME,:BOARD_CODE,:EXAM_ROLL_NO,:REG_NO,:SESSION_NO,:EXAM_YEAR,:p_LOC_CODE,:p_SSC_GR_CODE,:p_GP_BANG,:p_GP_ENG,:p_GP_RELI,:p_GP_MATH,:p_GP_PHY,
    //    :p_GP_CHE,:p_GP_BIO,:p_GP_HMATH,:p_GP_SCI,:p_GP_ACC,:p_ADD_SUB_NAME,:p_GP_ADD_SUB,:SSC_GPA,:TOTAL_APLUS,
    //    :SSC_MARKS,:p_SSC_VERSION,:SMS_MOBILE_NO,:p_OTP,:EXAM_SUB_NAME1,:GP_EXAM_SUB31,:EXAM_SUB_NAME2,:GP_EXAM_SUB2,:EXAM_SUB_NAME3,:GP_EXAM_SUB3); end;");



    $stid = oci_parse($conn, "begin PKG_AD_APP.DPD_AD_APP_INSERT(:o_status,:p_APP_ROLL_NO,:p_APP_CAT,:imdata,:STD_NAME,:STD_MOBILE_NO,:RG_CODE,:RG_SECT,:F_NAME,:F_MOBILE_NO,:M_NAME,:M_MOBILE_NO,:SCHOOL_NAME,:BOARD_CODE,:EXAM_ROLL_NO,:REG_NO,:SESSION_NO,:EXAM_YEAR,:p_LOC_CODE,:p_SSC_GR_CODE,:p_GP_BANG,:p_GP_ENG,:p_GP_RELI,:p_GP_MATH,:p_GP_PHY,
   :p_GP_CHE,:p_GP_BIO,:p_GP_HMATH,:p_GP_SCI,:p_GP_ACC,:p_ADD_SUB_NAME,:p_GP_ADD_SUB,:SSC_GPA,:TOTAL_APLUS,
   :SSC_MARKS,:p_SSC_VERSION,:SMS_MOBILE_NO,:EXAM_SUB_NAME1,:GP_EXAM_SUB31,:EXAM_SUB_NAME2,:GP_EXAM_SUB2,:EXAM_SUB_NAME3,:GP_EXAM_SUB3,:EXAM_SUB_NAME4,:GP_EXAM_SUB4,:p_OTP,:p_TB_EXAM_ROLL_NO,:p_TB_REG_NO,:p_GP_ECO,:p_GP_CIVICS,:p_GP_GEO,:p_GP_QURAN,:p_GP_ARABIC,:p_GP_AQAID,:p_GP_ISLAM,:p_GP_SCIENCE,:p_GP_FIN,:p_GP_BUSINT,:TOTAL_MARKS,:p_APP_MODE); end;");


    oci_bind_by_name($stid, ":o_status", $returnval, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_APP_ROLL_NO", $p_APP_ROLL_NO, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_APP_CAT", $p_APP_CAT, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":imdata", $imdata, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":STD_NAME", $STD_NAME, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":STD_MOBILE_NO", $STD_MOBILE_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":RG_CODE", $RG_CODE, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":RG_SECT", $RG_SECT, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":F_NAME", $F_NAME, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":F_MOBILE_NO", $F_MOBILE_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":M_NAME", $M_NAME, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":M_MOBILE_NO", $M_MOBILE_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":SCHOOL_NAME", $SCHOOL_NAME, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":BOARD_CODE", $BOARD_CODE, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":EXAM_ROLL_NO", $EXAM_ROLL_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":REG_NO", $REG_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":SESSION_NO", $SESSION_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":EXAM_YEAR", $EXAM_YEAR, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_LOC_CODE", $p_LOC_CODE, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_SSC_GR_CODE", $p_SSC_GR_CODE, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_BANG", $p_GP_BANG, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_ENG", $p_GP_ENG, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_RELI", $p_GP_RELI, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_MATH", $p_GP_MATH, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_PHY", $p_GP_PHY, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_CHE", $p_GP_CHE, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_BIO", $p_GP_BIO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_HMATH", $p_GP_HMATH, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_SCI", $p_GP_SCI, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_ACC", $p_GP_ACC, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_ADD_SUB_NAME", $p_ADD_SUB_NAME, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_ADD_SUB", $p_GP_ADD_SUB, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":SSC_GPA", $SSC_GPA, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":TOTAL_APLUS", $TOTAL_APLUS, -1, SQLT_INT);
    oci_bind_by_name($stid, ":SSC_MARKS", $SSC_MARKS, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_SSC_VERSION", $p_SSC_VERSION, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":SMS_MOBILE_NO", $SMS_MOBILE_NO, -1, SQLT_CHR);
    // oci_bind_by_name($stid, ":p_OTP", $p_OTP, -1, SQLT_INT);
    oci_bind_by_name($stid, ":EXAM_SUB_NAME1", $EXAM_SUB_NAME1, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":GP_EXAM_SUB31", $GP_EXAM_SUB31, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":EXAM_SUB_NAME2", $EXAM_SUB_NAME2, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":GP_EXAM_SUB2", $GP_EXAM_SUB2, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":EXAM_SUB_NAME3", $EXAM_SUB_NAME3, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":GP_EXAM_SUB3", $GP_EXAM_SUB3, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":EXAM_SUB_NAME4", $EXAM_SUB_NAME4, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":GP_EXAM_SUB4", $GP_EXAM_SUB4, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_OTP", $p_OTP, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_TB_EXAM_ROLL_NO", $p_TB_EXAM_ROLL_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_TB_REG_NO", $p_TB_REG_NO, -1, SQLT_CHR);
    oci_bind_by_name($stid, ":p_GP_ECO", $p_GP_ECO, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_CIVICS", $p_GP_CIVICS, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_GEO", $p_GP_GEO, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_QURAN", $p_GP_QURAN, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_ARABIC", $p_GP_ARABIC, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_AQAID", $p_GP_AQAID, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_ISLAM", $p_GP_ISLAM, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_SCIENCE", $p_GP_SCIENCE, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_FIN", $p_GP_FIN, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_GP_BUSINT", $p_GP_BUSINT, -1, SQLT_INT);
    oci_bind_by_name($stid, ":TOTAL_MARKS", $TOTAL_MARKS, -1, SQLT_INT);
    oci_bind_by_name($stid, ":p_APP_MODE", $p_APP_MODE, -1, SQLT_CHR);

    oci_execute($stid);

    //print $returnval;
    if ($returnval === 0) {
        // Display SweetAlert error message
        echo '<script>
        Swal.fire({
            title: "Please carefully fill up all the fields.",
            showClass: {
              popup: "animate__animated animate__fadeInDown"
            },
            hideClass: {
              popup: "animate__animated animate__fadeOutUp"
            }
          })
          
      </script>';
    } else if ($returnval === 1) {
        echo '<script>
            Swal.fire({
                // icon: "success",
                text: "Your Application is submitted!!",
                confirmButtonColor: "#3085d6",
                cancelButtonColor: "#d33",
                confirmButtonText: "OK"
                }).then((result) => {
                if (result.isConfirmed) {
                    window.location.href = "index.php";
                }
                })
        </script>';
    } else if ($returnval === 2) {
        echo '<script>alert("Your SMS contact number is a duplicate! Please try another number!")</script>';
    }

    oci_free_statement($stid);


    // oci_close($conn);

    // if($returnval==0){
    //    echo '
    //    <script> 
    //    function view()
    //    {
    //      document.getElementById("e_s_religion").innerHTML = "GPA should be 1 to 5"

    //     }

    //      </script>';
    // }




    //    $mas = "UPDATE AD_APP SET OTP='" . $p_OTP . "' where  SMS_MOBILE_NO='" . $SMS_MOBILE_NO . "'";


    // $parseresult = ociparse($conn, $mas);

    // ociexecute($parseresult);





    // $messageUrl = urlencode('Application Successfully Completed. Your User Id ' . $SMS_MOBILE_NO .  '  And Password ' . $p_OTP);


    // $response = file_get_contents('https://api.securemxbd.com/api/v2/SendSMS?ApiKey=nHvSQYqVGuy1AmfCloNt59tgZxaxQduZIapRrXBl+RQ=&ClientId=9db3a4e4-a3a4-4b7b-af56-68b97973aee2&SenderId=Notre%20Dame&Message=' . $messageUrl . '&MobileNumbers=88' . $SMS_MOBILE_NO .'&Is_Unicode=true&Is_Flash=true');








    // oci_free_statement($parseresult);
    // oci_close($conn);

    // header("location:index.php");






















   
    

















}


?>

  <!-- all validation starts  -->
  <script>
     function myfun() {
        var ad_cat = document.getElementById("ad_cat").value;
        var ssc_group = document.getElementById("ssc_group").value;


        var s_bangla = document.getElementById("s_bangla").value;
        var s_english = document.getElementById("s_english").value;
        var s_mathematics = document.getElementById("s_mathematics").value;
        var physics = document.getElementById("physics").value;
        var chemistry = document.getElementById("chemistry").value;
        var biology = document.getElementById("biology").value;
        var highermath = document.getElementById("highermath").value;
        var s_addsub = document.getElementById("s_addsub").value;
        var s_grade_point = document.getElementById("s_grade_point").value;
        var s_ssc_gpa = document.getElementById("s_ssc_gpa").value;
        var s_total_aplus = document.getElementById("s_total_aplus").value;
        var version_ssc = document.getElementById("version_ssc").value;



        
        var h_ssc_gpa = document.getElementById("h_ssc_gpa").value;
        var h_total_aplus = document.getElementById("h_total_aplus").value;
        var g_ssc_gpa = document.getElementById("g_ssc_gpa").value;
        var g_total_aplus = document.getElementById("g_total_aplus").value;
        var bs_ssc_gpa = document.getElementById("bs_ssc_gpa").value;
        var bs_total_aplus = document.getElementById("bs_total_aplus").value;
        var massage_mobile = document.getElementById("massage_mobile").value;




        var mobile = /^[0-9]{11}$/;




        if (ad_cat == 1) {
                if (ssc_group == 1 || ssc_group == 3) {
                    document.getElementById("e_group").innerHTML = "";
                } else {
                    document.getElementById("e_group").innerHTML = "SSC Group Should Be Science Or General";
                    return false;
                }

            }else if (ad_cat == 2) {
                if (ssc_group == 1) {
                    document.getElementById("e_group").innerHTML = "";
                } else {
                    document.getElementById("e_group").innerHTML = "SSC Group Should Be Science";
                    return false;
                }
            }else if (ad_cat == 3) {
                if (ssc_group == 1 || ssc_group == 2 || ssc_group == 3 || ssc_group == 4) {
                    document.getElementById("e_group").innerHTML = "";
                } else {
                    document.getElementById("e_group").innerHTML = "SSC Group Should Be Science Or Humanities Or General Or Business Studies";
                    return false;
                }
            }else if (ad_cat == 4) {
                if (ssc_group == 1 || ssc_group == 3 || ssc_group == 4) {
                    document.getElementById("e_group").innerHTML = "";
                } else {
                    document.getElementById("e_group").innerHTML = "SSC Group Should Be Science Or general Or Business Studies";
                    return false;
                }
            }



            if (ad_cat == 1) {
                if (ssc_group == 1) {
                if (s_bangla >= 1 && s_bangla <= 5) {
                    document.getElementById("e_s_bangla").innerHTML = " ";
                } else {
                    document.getElementById("e_s_bangla").innerHTML = "GPA should be 0 to 5";
                    return false;
                }


                if (s_english >= 1 && s_english <= 5) {
                    document.getElementById("e_s_english").innerHTML = " ";
                } else {
                    document.getElementById("e_s_english").innerHTML = "GPA should be 0 to 5";
                    return false;
                }




                if (s_mathematics >= 1 && s_mathematics <= 5) {
                    document.getElementById("e_s_mathematics").innerHTML = " ";
                } else {
                    document.getElementById("e_s_mathematics").innerHTML = "GPA should be 1 to 5";
                    return false;
                }


                if (physics >= 1 && physics <= 5) {
                    document.getElementById("e_physics").innerHTML = " ";
                } else {
                    document.getElementById("e_physics").innerHTML = "GPA should be 1 to 5";
                    return false;
                }


                if (chemistry >= 1 && chemistry <= 5) {
                    document.getElementById("e_chemistry").innerHTML = " ";
                } else {
                    document.getElementById("e_chemistry").innerHTML = "GPA should be 1 to 5";
                    return false;
                }

                if (biology >= 1 && biology <= 5) {
                        document.getElementById("e_biology").innerHTML = " ";
                    } else {
                        document.getElementById("e_biology").innerHTML = "GPA should be 1 to 5";
                        return false;
                    }


               if (highermath >= 1 && highermath <= 5) {
                        document.getElementById("e_highermath").innerHTML = " ";
                    } else {
                        document.getElementById("e_highermath").innerHTML = "GPA should be 1 to 5";
                        return false;
                    }

                
    

                

                if (s_addsub.length != 0) {
                    document.getElementById("e_s_addsub").innerHTML = " ";
                } else {
                    document.getElementById("e_s_addsub").innerHTML = "This Field is required";
                    return false;
                }

                if (s_grade_point >= 1 && s_grade_point <= 5) {
                    document.getElementById("e_s_grade_point").innerHTML = " ";
                } else {
                    document.getElementById("e_s_grade_point").innerHTML = "GPA should be 1 to 5";
                    return false;
                }


                if (s_ssc_gpa == 5) {
                    document.getElementById("e_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("e_ssc_gpa").innerHTML = "GPA should be 5";
                    return false;
                }


                if (s_total_aplus >= 1 && s_total_aplus <= 10) {
                    document.getElementById("es_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("es_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }
            }
            }else if (ad_cat == 3) {
                if (ssc_group == 1) {

                if (s_addsub.length != 0) {
                    document.getElementById("e_s_addsub").innerHTML = " ";
                } else {
                    document.getElementById("e_s_addsub").innerHTML = "This Field is required";
                    return false;
                }

                if (s_grade_point >= 1 && s_grade_point <= 5) {
                    document.getElementById("e_s_grade_point").innerHTML = " ";
                } else {
                    document.getElementById("e_s_grade_point").innerHTML = "GPA should be 1 to 5";
                    return false;
                }


                if (s_ssc_gpa >= 3.50 && s_ssc_gpa <= 5.00) {
                    document.getElementById("e_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("e_ssc_gpa").innerHTML = "GPA should be 3.50 to 5.00";
                    return false;
                }


                if (s_total_aplus >= 1 && s_total_aplus <= 10) {
                    document.getElementById("es_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("es_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }
            }
            } else if (ad_cat == 4) {
                if (ssc_group == 1) {

                if (s_addsub.length != 0) {
                    document.getElementById("e_s_addsub").innerHTML = " ";
                } else {
                    document.getElementById("e_s_addsub").innerHTML = "This Field is required";
                    return false;
                }

                if (s_grade_point >= 1 && s_grade_point <= 5) {
                    document.getElementById("e_s_grade_point").innerHTML = " ";
                } else {
                    document.getElementById("e_s_grade_point").innerHTML = "GPA should be 1 to 5";
                    return false;
                }


                if (s_ssc_gpa >= 4.50 && s_ssc_gpa <= 5) {
                    document.getElementById("e_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("e_ssc_gpa").innerHTML = "GPA should be 4.50 to 5.00";
                    return false;
                }


                if (s_total_aplus >= 1 && s_total_aplus <= 10) {
                    document.getElementById("es_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("es_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }
            }
            }



            if (ad_cat == 1) {
                if (ssc_group == 3) {


                    

            
                if (g_ssc_gpa == 5) {
                    document.getElementById("eg_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("eg_ssc_gpa").innerHTML = "GPA should be 5.00";
                    return false;
                }


                if (g_total_aplus >= 1 && g_total_aplus <= 10) {
                    document.getElementById("eg_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("eg_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }


            }
            } else if (ad_cat == 3) {
                if (ssc_group == 3) {


                    

            
                if (g_ssc_gpa >= 3.00 && g_ssc_gpa <= 5.00) {
                    document.getElementById("eg_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("eg_ssc_gpa").innerHTML = "GPA should be Above 3.00 to 5.00";
                    return false;
                }


                if (g_total_aplus >= 1 && g_total_aplus <= 10) {
                    document.getElementById("eg_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("eg_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }


            }
            }else if (ad_cat == 4) {
                if (ssc_group == 3) {

                if (g_ssc_gpa >= 4.00 && g_ssc_gpa <= 5.00) {
                    document.getElementById("eg_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("eg_ssc_gpa").innerHTML = "GPA should be Above 4.00 to 5.00";
                    return false;
                }


                if (g_total_aplus >= 1 && g_total_aplus <= 10) {
                    document.getElementById("eg_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("eg_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }


            }
            }
            
            
            
            
            if (ad_cat == 3) {
                if (ssc_group == 2) {


                    

            
                if (h_ssc_gpa >= 3.00 && h_ssc_gpa <= 5.00) {
                    document.getElementById("eh_sc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("eh_sc_gpa").innerHTML = "GPA should be Above 3.00 to 5.00";
                    return false;
                }


                if (h_total_aplus >= 1 && h_total_aplus <= 10) {
                    document.getElementById("eh_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("eh_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }


               


            }
            }


            if (ad_cat == 4) {
                if (ssc_group == 4) {

            
                if (bs_ssc_gpa >= 4.00 && bs_ssc_gpa <= 5.00) {
                    document.getElementById("ebs_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("ebs_ssc_gpa").innerHTML = "GPA should be Above 4.00 to 5.00";
                    return false;
                }


                if (bs_total_aplus >= 1 && bs_total_aplus <= 10) {
                    document.getElementById("ebs_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("ebs_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }
            }
            }


            if (ad_cat == 3) {
                if (ssc_group == 4) {

            
                if (bs_ssc_gpa >= 3.50 && bs_ssc_gpa <= 5.00) {
                    document.getElementById("ebs_ssc_gpa").innerHTML = " ";
                } else {
                    document.getElementById("ebs_ssc_gpa").innerHTML = "GPA should be Above 3.50 to 5.00";
                    return false;
                }

                if (bs_total_aplus >= 1 && bs_total_aplus <= 10) {
                    document.getElementById("ebs_total_aplus").innerHTML = " ";
                } else {
                    document.getElementById("ebs_total_aplus").innerHTML = "total A+ should be Max 10";
                    return false;
                }
            }
            }



            if (ad_cat == 1 || ad_cat == 3 || ad_cat == 4) {
                if (version_ssc == "B") {
                    document.getElementById("e_version_ssc").innerHTML = "";
                } else {
                    document.getElementById("e_version_ssc").innerHTML = "SSC Version Should Be Bangla ";
                    return false;
                }

            } else if (ad_cat == 2) {
                if (version_ssc == "E") {
                    document.getElementById("e_version_ssc").innerHTML = "";
                } else {
                    document.getElementById("e_version_ssc").innerHTML = "SSC Version Should Be Science English ";
                    return false;
                }

            }



            if (mobile.test(massage_mobile)) {
                document.getElementById("e_massage_mobile").innerHTML = " ";
            } else {
                document.getElementById("e_massage_mobile").innerHTML = "mobile number should be 11 digit";
                return false;
            }




            


            





        






        

     }
  </script>
  <!-- all validation ends  -->


    <form action="" onsubmit="return myfun()" method="POST" enctype="multipart/form-data">

        <div class="container">
            <div class="card">
                <div class="card-body">
                    <header class="col-lg-12 col-md-12 col-sm-12 text-center">
                        <h2>Admission Application Form 2023</h2>
                        <h4>Notre Dame College, Dhaka</h4>
                    </header>
                    <div class="form-body">
                        <form action="" method="">
                            <div class="row m-3">
                                <div class="col-lg-3 col-md-3 col-sm-12">
                                    <div class="row">
                                        <div class="">
                                            <label for="text" class="font-weight-bold">Apply for admission to study:</label>
                                        </div>
                                        <div class="col-lg-12 col-md-6 col-sm-12 ">
                                            <select class="form-select" name="ad_cat" id="ad_cat">
                                                <option value="">Select Your Subject</option>
                                                <?php
                                                for ($i = 0; $i < count($subject); $i++) {

                                                    echo "<option value='" . $subject[$i]["CAT_CODE"] . "'>" . $subject[$i]["CAT_NAME"] . "</option>";
                                                    // if($subject[$i]["CAT_CODE"] == $p_APP_CAT) {
                                                    //    echo "<option value='" . $subject[$i]["CAT_CODE"] . "'selected>" . $subject[$i]["CAT_NAME"] . "</option>";
                                                    // } else {
                                                    //    echo "<option value='" . $subject[$i]["CAT_CODE"] . "'>" . $subject[$i]["CAT_NAME"] . "</option>";
                                                    // }
                                                }

                                                ?>
                                            </select>

                                        </div>
                                    </div>
                                </div>

                                <div class="col-lg-9 col-md-9 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-3 col-md-3 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Photograph:</label>

                                        </div>
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <input type="file" accept="image/*" name="file" id="file" onchange="preview_image(event)" >
                                        </div>
                                        <div class="col-lg-3 col-md-3 col-sm-12">
                                            <img id="output_image" width="130px" height="130px"></img>
                                            <input type="text" class="form-control" name="basedata" id="basedata" hidden>
                                            <p style="font-size: 10px;font-weight: bold;color: red;">Recent Pic Must Be Needed</p>
                                        </div>
                                    </div>
                                </div>

                            </div>

                            
                            <div class="row m-3">
                                <div class="col-lg-7 col-md-7 col-sm-12">
                                    <div class="row ">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Full Name of Student:</label>
                                        </div>
                                        <div class="col-lg-7 col-md-7 col-sm-12">
                                            <input type="text" class="form-control" name="full_name"  id="full_name" placeholder="Enter Student Name" oninput="checkLength(this)" value="<?php if (isset($_POST['full_name'])) echo $_POST['full_name']; ?>">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-5 col-md-5 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-5 col-md-5 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Student's Mobile No:</label>
                                        </div>
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <input type="number" class="form-control" name="stu_mobile" id="stu_mobile"  oninput="validateNumber(this)" placeholder="Enter Student Mobile Number" value="<?php if (isset($_POST['stu_mobile'])) echo $_POST['stu_mobile']; ?>">
                                            <span id="msg" style="color:red; font-weight:bold"></span>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="row ml-2">
                                <div class="col-lg-3 col-md-3 col-sm-12">
                                    <div class="row ">
                                        <p>(According to SSC Admit Card)</p>
                                    </div>
                                </div>
                            </div>


                            <div class="row m-3">
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-3 col-md-3 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Religion:</label>
                                        </div>
                                        <div class="col-lg-6 col-md-6 col-sm-12 ">
                                            <select class="form-select" name="religion_1" id="religion_1">
                                                <option value="">Select Your Religion</option>
                                                <?php
                                                for ($i = 0; $i < count($religion); $i++) {

                                                    // echo "<option value='" . $religion[$i]["RG_CODE"] . "'>" . $religion[$i]["RG_NAME"] . "</option>";
                                                    if ($religion[$i]["RG_CODE"] == $RG_CODE) {
                                                        echo "<option value='" . $religion[$i]["RG_CODE"] . "'selected>" . $religion[$i]["RG_NAME"] . "</option>";
                                                    } else {
                                                        echo "<option value='" . $religion[$i]["RG_CODE"] . "'>" . $religion[$i]["RG_NAME"] . "</option>";
                                                    }
                                                }

                                                ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-5 col-md-5 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Religious Sect:</label>
                                        </div>
                                        <div class="col-lg-7 col-md-7 col-sm-12">
                                            <input type="text" class="form-control" name="religious_sect" id="religious_sect" placeholder="Enter Your Religion Sect" value="<?php if (isset($_POST['religious_sect'])) echo $_POST['religious_sect']; ?>">
                                        </div>
                                    </div>
                                    <!-- <p class="col-lg-12 col-md-12 col-sm-12" style="font-weight: bold;">Shia/Sunni, Brahmana/Kshatriya, Catholic/Baptist</p> -->
                                    <p class="col-lg-12 col-md-12 col-sm-12" style="font-weight: bold;">(যেমন : শিয়া/সুন্নি, ব্রাহ্মণ/ক্ষত্রিয়, ক্যাথলিক/ব্যাপ্টিস্ট ইত্যাদি)</p>
                                </div>
                            </div>

                            
                            <div class="row m-3">
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Father's Name:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="text" class="form-control"  name="fathers_name" id="fathers_name" placeholder="Enter Fathers Name" oninput="checkLength1(this)" value="<?php if (isset($_POST['fathers_name'])) echo $_POST['fathers_name']; ?>">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Father's Mobile No:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="number" class="form-control" name="fathers_mobile" oninput="validateNumber1(this)" id="fathers_mobile" placeholder="Enter Fathers Mobile Number" value="<?php if (isset($_POST['fathers_mobile'])) echo $_POST['fathers_mobile']; ?>">
                                            <span id="msgf" style="color:red; font-weight:bold"></span>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <div class="row m-3">
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Mother's Name:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="text" class="form-control" name="mothers_name" id="mothers_name" placeholder="Enter Mothers Name" oninput="checkLength2(this)" value="<?php if (isset($_POST['mothers_name'])) echo $_POST['mothers_name']; ?>">
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Mother's Mobile No:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="number" class="form-control" oninput="validateNumber2(this)" name="mothers_mobile" id="mothers_mobile" placeholder="Enter Mothers Mobile Number" value="<?php if (isset($_POST['mothers_mobile'])) echo $_POST['mothers_mobile']; ?>">
                                            <span id="msgm" style="color:red; font-weight:bold"></span>
                                        </div>
                                    </div>
                                </div>
                            </div>


                            <h5 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold">Information regarding your SSC Exam:</h5>
                            <div class="row m-3">
                                <div class="col-lg-12 col-md-12 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-2 col-md-2 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Full Name of School:</label>
                                        </div>
                                        <div class="col-lg-7 col-md-7 col-sm-12">
                                            <input type="text" class="form-control" name="school_name" id="school_name" placeholder="Enter Full Name Of School" oninput="checkLength3(this)"  value="<?php if (isset($_POST['school_name'])) echo $_POST['school_name']; ?>">
                                        </div>
                                    </div>
                                </div>
                            </div>



                            <div class="row m-3">
                                <div class="col-sm-12 col-md-6">
                                    <div class="row">
                                        <div class="col-sm-12 col-md-4">
                                            <label for="text" class="text-center font-weight-bold">Board:</label>
                                        </div>
                                        <div class="col-sm-12 col-md-8">
                                            <select class="form-select" name="board" id="board">
                                                <option value="">Select Board</option>
                                                <?php
                                                for ($i = 0; $i < count($board); $i++) {

                                                    // echo "<option value='" . $board[$i]["BOARD_CODE"] . "'>" . $board[$i]["BOARD_NAME"] . "</option>";
                                                    if ($board[$i]["BOARD_CODE"] == $BOARD_CODE) {
                                                        echo "<option value='" . $board[$i]["BOARD_CODE"] . "' selected>" . $board[$i]["BOARD_NAME"] . "</option>";
                                                    } else {
                                                        echo "<option value='" . $board[$i]["BOARD_CODE"] . "'>" . $board[$i]["BOARD_NAME"] . "</option>";
                                                    }
                                                }

                                                ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-12 col-md-6">
                                    <div class="row">
                                        <div class="col-sm-12 col-md-3">
                                            <label for="text" class="text-center font-weight-bold">Exam. Roll No:</label>
                                        </div>
                                        <div class="col-sm-12 col-md-9">
                                            <input type="number" class="form-control" name="exam_roll" id="exam_roll" placeholder="Enter Your Exam Roll Number" value="<?php if (isset($_POST['exam_roll'])) echo $_POST['exam_roll']; ?>">
                                            <!-- <span id="e_ssc_gpa" style="color:red; font-weight:bold"></span> -->
                                        </div>
                                    </div>
                                </div>

                            </div>

                            <div class="row">
                                <div class="col-sm-12 col-md-4">
                                    <div class="row">
                                        <div class="col-sm-12 col-md-4">
                                            <label for="text" class="text-center font-weight-bold">Registration No:</label>
                                        </div>
                                        <div class="col-sm-12 col-md-8">
                                            <input type="number" class="form-control" name="reg_number" id="reg_number" placeholder="Enter Your Registration Number" value="<?php if (isset($_POST['reg_number'])) echo $_POST['reg_number']; ?>">
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-12 col-md-4">
                                    <div class="row">
                                        <div class="col-sm-12 col-md-4">
                                            <label for="text" class="text-center font-weight-bold">Session:</label>
                                        </div>
                                        <div class="col-sm-12 col-md-8">
                                            <input type="text" class="form-control" name="session" id="session" placeholder="Enter Session" value="<?php if (isset($_POST['session'])) echo $_POST['session']; ?>">
                                        </div>
                                    </div>
                                </div>

                                <div class="col-sm-12 col-md-4">
                                    <div class="row">
                                        <div class="col-sm-12 col-md-4">
                                            <label for="text" class="text-center font-weight-bold">Exam. Year:</label>
                                        </div>
                                        <div class="col-sm-12 col-md-7">
                                            <input type="number" class="form-control" name="exam_year" id="exam_year" placeholder="Enter Exam Year" value="<?php if (isset($_POST['exam_year'])) echo $_POST['exam_year']; ?>">
                                        </div>
                                    </div>
                                </div>
                            </div>



                            <div class="row m-3">
                                <div class="col-lg-6 col-md-3 col-sm-6">
                                    <div class="row">
                                        <div class="col-lg-3 col-md-6 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">Location of the School:</label>
                                        </div>
                                        <div class="col-lg-6 col-md-6 col-sm-12">
                                            <select class="form-select" name="school_location" id="school_location">
                                                <option value="">Select Location</option>
                                                <?php
                                                for ($i = 0; $i < count($school_location); $i++) {

                                                    // echo "<option value='" . $school_location[$i]["LOC_CODE"] . "'>" . $school_location[$i]["LOC_NAME"] . "</option>";
                                                    if ($school_location[$i]["LOC_CODE"] == $p_LOC_CODE) {
                                                        echo "<option value='" . $school_location[$i]["LOC_CODE"] . "'selected>" . $school_location[$i]["LOC_NAME"] . "</option>";
                                                    } else {
                                                        echo "<option value='" . $school_location[$i]["LOC_CODE"] . "'>" . $school_location[$i]["LOC_NAME"] . "</option>";
                                                    }
                                                }

                                                ?>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-6">

                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-6">

                                </div>

                            </div>
























                            <div class="row  m-3">
                                <div class="col-lg-6 col-md-6 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-3 col-md-3 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">SSC Group:</label>
                                        </div>
                                        <div class="col-lg-6 col-md-5 col-sm-12" onclick="myFunction()">
                                            <select class="form-select" name="ssc_group" id="ssc_group">
                                                <option>Select SSC Group</option>
                                                <!-- <option value="1">Science</option>
                                                <option value="2">Humanities</option>
                                                <option value="3">General</option>
                                                <option value="4">Business Studies</option> -->
                                            </select>
                                        </div>
                                        <span id="e_group" style="color:red; font-weight:bold"></span>
                                    </div>
                                </div>
                            </div>
                            <div class="row  m-3">
                                <div class="col-lg-12 col-md-12 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-12 col-md-12 col-sm-12">
                                            <!-- <h6 class="text-center">Grade points of each subject must be filled up of SSC/Dakhil/Equivalent Examination</h6> -->
                                            <h6 class="text-center" style="font-weight: bold;">এসএসসি/দাখিল/সমমানের পরীক্ষায় প্রাপ্ত বিষয়ভিত্তিক Grade Point পূরণ করতে হবে। </h6>
                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-12 col-md-12 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-12 col-md-12 col-sm-12">
                                            <!-- <h6 class="text-center">For Example: 4.00, 4.50, 5.00 etc.</h6> -->
                                            <h6 class="text-center" style="font-weight: bold;">(উদাহরণস্বরূপ : 3.50,4.00,5.00 ইত্যাদি) </h6>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="1 group">
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Bangla:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="s_bangla" id="s_bangla" value="<?php if (isset($_POST['s_bangla'])) echo $_POST['s_bangla']; ?>">
                                                <span id="e_s_bangla" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">English:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="s_english" id="s_english" value="<?php if (isset($_POST['s_english'])) echo $_POST['s_english']; ?>">
                                                <span id="e_s_english" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Mathematics:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="s_mathematics" id="s_mathematics" value="<?php if (isset($_POST['s_mathematics'])) echo $_POST['s_mathematics']; ?>">
                                                <span id="e_s_mathematics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Physics(Mandatory):</label>
                                            </div>
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="physics" id="physics" value="<?php if (isset($_POST['physics'])) echo $_POST['physics']; ?>">
                                                <span id="e_physics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row m-3">

                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-8 col-md-8 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Chemistry(Mandatory):</label>
                                            </div>
                                            <div class="col-lg-4 col-md-4 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="chemistry" id="chemistry" value="<?php if (isset($_POST['chemistry'])) echo $_POST['chemistry']; ?>">
                                                <span id="e_chemistry" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Biology(Mandatory):</label>
                                            </div>
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="biology" id="biology" value="<?php if (isset($_POST['biology'])) echo $_POST['biology']; ?>">
                                                <span id="e_biology" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-8 col-md-8 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Higher Math(Mandatory):</label>
                                            </div>
                                            <div class="col-lg-4 col-md-4 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="highermath" id="highermath" value="<?php if (isset($_POST['highermath'])) echo $_POST['highermath']; ?>">
                                                <span id="e_highermath" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>




                                <div class="row  m-3">
                                    <div class="col-lg-8 col-md-8 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">The names and GPA of the Other subjects that have been examined:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <span class="font-weight-bold">Subjects</span>
                                                <input type="text" class="form-control m-2" name="sb_sub_name_1" id="sb_sub_name_1" value="<?php if (isset($_POST['sb_sub_name_1'])) echo $_POST['sb_sub_name_1']; ?>">
                                                <span id="e_sub_name_1" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="sb_sub_name_2" id="sb_sub_name_2" value="<?php if (isset($_POST['sb_sub_name_2'])) echo $_POST['sb_sub_name_2']; ?>">
                                                <span id="e_sub_name_2" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="sb_sub_name_3" id="sb_sub_name_3" value="<?php if (isset($_POST['sb_sub_name_3'])) echo $_POST['sb_sub_name_3']; ?>">
                                                <span id="e_sub_name_3" style="color:red; font-weight:bold"></span>


                                                <input type="text" class="form-control m-2" name="sb_sub_name_4" id="sb_sub_name_4" value="<?php if (isset($_POST['sb_sub_name_4'])) echo $_POST['sb_sub_name_4']; ?>">
                                                <span id="sb_sub_name_4" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-12">
                                        <div class="row">

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <span class="font-weight-bold">Grade Point</span>
                                                <input type="text" class="form-control m-2" name="sb_sub_mark_1" id="sb_sub_mark_1" value="<?php if (isset($_POST['sb_sub_mark_1'])) echo $_POST['sb_sub_mark_1']; ?>">
                                                <!-- <span id="e_sb_sub_mark_1" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="sb_sub_mark_2" id="sb_sub_mark_2" value="<?php if (isset($_POST['sb_sub_mark_2'])) echo $_POST['sb_sub_mark_2']; ?>">
                                                <!-- <span id="e_sb_sub_mark_2" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="sb_sub_mark_3" id="sb_sub_mark_3" value="<?php if (isset($_POST['sb_sub_mark_3'])) echo $_POST['sb_sub_mark_3']; ?>">
                                                <!-- <span id="e_sb_sub_mark_3" style="color:red; font-weight:bold"></span> -->



                                                <input type="text" class="form-control m-2" name="sb_sub_mark_4" id="sb_sub_mark_4" value="<?php if (isset($_POST['sb_sub_mark_4'])) echo $_POST['sb_sub_mark_4']; ?>">
                                                <!-- <span id="sb_sub_mark_4" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>











                                <div class="row m-3">
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <p class="font-weight-bold">Name of SSC Additional Subject & Grade Point:</p>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" class="form-control" name="s_addsub" id="s_addsub" placeholder="Additional sub" value="<?php if (isset($_POST['s_addsub'])) echo $_POST['s_addsub']; ?>">
                                                <span id="e_s_addsub" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Grade Point:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="s_grade_point" id="s_grade_point" placeholder="Grade Point" value="<?php if (isset($_POST['s_grade_point'])) echo $_POST['s_grade_point']; ?>">
                                                <span id="e_s_grade_point" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="<?php echo $ssc_group[1]["GR_CODE"] ?> group">
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Bangla:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_bangla" id="h_bangla" value="<?php if (isset($_POST['h_bangla'])) echo $_POST['h_bangla']; ?>">
                                                <span id="e_h_bangla" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">English:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_english" id="h_english" value="<?php if (isset($_POST['h_english'])) echo $_POST['h_english']; ?>">
                                                <span id="e_h_english" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Mathematics:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_mathematics" id="h_mathematics" value="<?php if (isset($_POST['h_mathematics'])) echo $_POST['h_mathematics']; ?>">
                                                <span id="e_h_mathematics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Science:</label>
                                            </div>
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_science" id="h_science" value="<?php if (isset($_POST['h_science'])) echo $_POST['h_science']; ?>">
                                                <span id="e_h_science" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Economics:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="economics" id="economics" value="<?php if (isset($_POST['economics'])) echo $_POST['economics']; ?>">
                                                <span id="e_h_economics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>



                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Civics & Citizenship:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="civics" id="civics" value="<?php if (isset($_POST['civics'])) echo $_POST['civics']; ?>">
                                                <!-- <span id="e_h_civics" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Geography & Environment:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="geography" id="geography" value="<?php if (isset($_POST['geography'])) echo $_POST['geography']; ?>">
                                                <!-- <span id="e_h_geography" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>


                                <div class="row  m-3">
                                    <div class="col-lg-8 col-md-8 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">The names and GPA of the Other subjects that have been examined:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <span class="font-weight-bold">Subjects</span>
                                                <input type="text" class="form-control m-2" name="h_sub_name_1" id="h_sub_name_1" value="<?php if (isset($_POST['h_sub_name_1'])) echo $_POST['h_sub_name_1']; ?>">
                                                <span id="e_sub_name_1" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="h_sub_name_2" id="h_sub_name_2" value="<?php if (isset($_POST['h_sub_name_2'])) echo $_POST['h_sub_name_2']; ?>">
                                                <span id="e_sub_name_2" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="h_sub_name_3" id="h_sub_name_3" value="<?php if (isset($_POST['h_sub_name_3'])) echo $_POST['h_sub_name_3']; ?>">
                                                <span id="e_sub_name_3" style="color:red; font-weight:bold"></span>


                                                <input type="text" class="form-control m-2" name="h_sub_name_4" id="h_sub_name_4" value="<?php if (isset($_POST['h_sub_name_4'])) echo $_POST['h_sub_name_4']; ?>">
                                                <span id="h_sub_name_4" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-12">
                                        <div class="row">

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <span class="font-weight-bold">Grade Point</span>
                                                <input type="text" class="form-control m-2" name="h_sub_mark_1" id="h_sub_mark_1" value="<?php if (isset($_POST['h_sub_mark_1'])) echo $_POST['h_sub_mark_1']; ?>">
                                                <!-- <span id="e_h_sub_mark_1" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="h_sub_mark_2" id="h_sub_mark_2" value="<?php if (isset($_POST['h_sub_mark_2'])) echo $_POST['h_sub_mark_2']; ?>">
                                                <!-- <span id="e_h_sub_mark_2" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="h_sub_mark_3" id="h_sub_mark_3" value="<?php if (isset($_POST['h_sub_mark_3'])) echo $_POST['h_sub_mark_3']; ?>">
                                                <!-- <span id="e_h_sub_mark_3" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="h_sub_mark_4" id="h_sub_mark_4" value="<?php if (isset($_POST['h_sub_mark_4'])) echo $_POST['h_sub_mark_4']; ?>">
                                                <!-- <span id="h_sub_mark_4" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>




                                <div class="row m-3">
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <p class="font-weight-bold">Name of SSC Additional Subject & Grade Point:</p>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" class="form-control" name="h_addsub" id="h_addsub" placeholder="Additional sub" value="<?php if (isset($_POST['h_addsub'])) echo $_POST['h_addsub']; ?>">
                                                <span id="e_h_addsub" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Grade Point:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_grade_point" id="h_grade_point" placeholder="Grade Point" value="<?php if (isset($_POST['h_grade_point'])) echo $_POST['h_grade_point']; ?>">
                                                <span id="e_h_grade_point" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="<?php echo $ssc_group[2]["GR_CODE"] ?> group">
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Bangla:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="g_bangla" id="g_bangla" value="<?php if (isset($_POST['g_bangla'])) echo $_POST['g_bangla']; ?>">
                                                <span id="e_g_bangla" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">English:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="g_english" id="g_english" value="<?php if (isset($_POST['g_english'])) echo $_POST['g_english']; ?>">
                                                <span id="e_g_english" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Mathematics:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="g_mathematics" id="g_mathematics" value="<?php if (isset($_POST['g_mathematics'])) echo $_POST['g_mathematics']; ?>">
                                                <span id="e_g_mathematics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Quran Majid Hadith Sharif:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="quran" id="quran" value="<?php if (isset($_POST['quran'])) echo $_POST['quran']; ?>">
                                                <span id="e_g_quran" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>



                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Arabic-I Arabic-II:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="hadith" id="hadith" value="<?php if (isset($_POST['hadith'])) echo $_POST['hadith']; ?>">
                                                <span id="e_g_hadith" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Aqaid & Fiqh:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="aqaid" id="aqaid" value="<?php if (isset($_POST['aqaid'])) echo $_POST['aqaid']; ?>">
                                                <span id="e_g_aqaid" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>



                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Islamic History:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="islamic_history" id="islamic_history" value="<?php if (isset($_POST['islamic_history'])) echo $_POST['islamic_history']; ?>">
                                                <span id="e_g_islamic_history" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>



                                </div>





                                <div class="row  m-3">
                                    <div class="col-lg-8 col-md-8 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">The names and GPA of the Other subjects that have been examined:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <span class="font-weight-bold">Subjects</span>
                                                <input type="text" class="form-control m-2" name="g_sub_name_1" id="g_sub_name_1" value="<?php if (isset($_POST['g_sub_name_1'])) echo $_POST['g_sub_name_1']; ?>">
                                                <span id="e_sub_name_1" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="g_sub_name_2" id="g_sub_name_2" value="<?php if (isset($_POST['g_sub_name_2'])) echo $_POST['g_sub_name_2']; ?>">
                                                <span id="e_sub_name_2" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="g_sub_name_3" id="g_sub_name_3" value="<?php if (isset($_POST['g_sub_name_3'])) echo $_POST['g_sub_name_3']; ?>">
                                                <span id="e_sub_name_3" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="g_sub_name_4" id="g_sub_name_4" value="<?php if (isset($_POST['g_sub_name_4'])) echo $_POST['g_sub_name_4']; ?>">
                                                <span id="g_sub_name_4" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-12">
                                        <div class="row">

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <span class="font-weight-bold">Grade Point</span>
                                                <input type="text" class="form-control m-2" name="g_sub_mark_1" id="g_sub_mark_1" value="<?php if (isset($_POST['g_sub_mark_1'])) echo $_POST['g_sub_mark_1']; ?>">
                                                <!-- <span id="e_g_sub_mark_1" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="g_sub_mark_2" id="g_sub_mark_2" value="<?php if (isset($_POST['g_sub_mark_2'])) echo $_POST['g_sub_mark_2']; ?>">
                                                <span id="e_g_sub_mark_2" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="g_sub_mark_3" id="g_sub_mark_3" value="<?php if (isset($_POST['g_sub_mark_3'])) echo $_POST['g_sub_mark_3']; ?>">
                                                <!-- <span id="e_g_sub_mark_3" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="g_sub_mark_4" id="g_sub_mark_4" value="<?php if (isset($_POST['g_sub_mark_4'])) echo $_POST['g_sub_mark_4']; ?>">
                                                <!-- <span id="g_sub_mark_4" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>






                                <div class="row m-3">
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <p class="font-weight-bold">Name of SSC Additional Subject & Grade Point:</p>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" class="form-control" name="g_addsub" id="g_addsub" placeholder="Additional sub" value="<?php if (isset($_POST['g_addsub'])) echo $_POST['g_addsub']; ?>">
                                                <span id="e_g_addsub" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Grade Point:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="g_grade_point" id="g_grade_point" placeholder="Grade Point" value="<?php if (isset($_POST['g_grade_point'])) echo $_POST['g_grade_point']; ?>">
                                                <span id="e_g_grade_point" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <div class="<?php echo $ssc_group[3]["GR_CODE"] ?> group">
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold"> Bangla:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_bangla" id="bs_bangla" value="<?php if (isset($_POST['bs_bangla'])) echo $_POST['bs_bangla']; ?>">
                                                <span id="e_bs_bangla" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">English:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_english" id="bs_english" value="<?php if (isset($_POST['bs_english'])) echo $_POST['bs_english']; ?>">
                                                <span id="e_bs_english" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Mathematics:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_mathematics" id="bs_mathematics" value="<?php if (isset($_POST['bs_mathematics'])) echo $_POST['bs_mathematics']; ?>">
                                                <span id="e_bs_mathematics" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Science:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_science" id="bs_science" value="<?php if (isset($_POST['bs_science'])) echo $_POST['bs_science']; ?>">
                                                <span id="e_bs_science" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="row m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Accounting:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="accounting" id="accounting" value="<?php if (isset($_POST['accounting'])) echo $_POST['accounting']; ?>">
                                                <span id="e_accounting" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Finance & Banking:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="finance" id="finance" value="<?php if (isset($_POST['finance'])) echo $_POST['finance']; ?>">
                                                <span id="e_bs_finance" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>



                                    <div class="col-lg-3 col-md-3 col-sm-6">
                                        <div class="row">
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Business Entrepreneurship:</label>
                                            </div>
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="business_etre" id="business_etre" value="<?php if (isset($_POST['business_etre'])) echo $_POST['business_etre']; ?>">
                                                <span id="e_bs_business_etre" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>




                                </div>



                                <div class="row  m-3">
                                    <div class="col-lg-8 col-md-8 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">The names and GPA of the Other subjects that have been examined:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <span class="font-weight-bold">Subjects</span>
                                                <input type="text" class="form-control m-2" name="bs_sub_name_1" id="bs_sub_name_1" value="<?php if (isset($_POST['bs_sub_name_1'])) echo $_POST['bs_sub_name_1']; ?>">
                                                <span id="e_sub_name_1" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="bs_sub_name_2" id="bs_sub_name_2" value="<?php if (isset($_POST['bs_sub_name_2'])) echo $_POST['bs_sub_name_2']; ?>">
                                                <span id="e_sub_name_2" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="bs_sub_name_3" id="bs_sub_name_3" value="<?php if (isset($_POST['bs_sub_name_3'])) echo $_POST['bs_sub_name_3']; ?>">
                                                <span id="e_sub_name_3" style="color:red; font-weight:bold"></span>

                                                <input type="text" class="form-control m-2" name="bs_sub_name_4" id="bs_sub_name_4" value="<?php if (isset($_POST['bs_sub_name_4'])) echo $_POST['bs_sub_name_4']; ?>">
                                                <span id="bs_sub_name_4" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-4 col-md-4 col-sm-12">
                                        <div class="row">

                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <span class="font-weight-bold">Grade Point</span>
                                                <input type="text" class="form-control m-2" name="bs_sub_mark_1" id="bs_sub_mark_1" value="<?php if (isset($_POST['bs_sub_mark_1'])) echo $_POST['bs_sub_mark_1']; ?>">
                                                <!-- <span id="e_bs_sub_mark_1" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="bs_sub_mark_2" id="bs_sub_mark_2" value="<?php if (isset($_POST['bs_sub_mark_2'])) echo $_POST['bs_sub_mark_2']; ?>">
                                                <!-- <span id="e_bs_sub_mark_2" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="bs_sub_mark_3" id="bs_sub_mark_3" value="<?php if (isset($_POST['bs_sub_mark_3'])) echo $_POST['bs_sub_mark_3']; ?>">
                                                <!-- <span id="e_bs_sub_mark_3" style="color:red; font-weight:bold"></span> -->

                                                <input type="text" class="form-control m-2" name="bs_sub_mark_4" id="bs_sub_mark_4" value="<?php if (isset($_POST['bs_sub_mark_4'])) echo $_POST['bs_sub_mark_4']; ?>">
                                                <!-- <span id="e_bs_sub_mark_4" style="color:red; font-weight:bold"></span> -->
                                            </div>
                                        </div>
                                    </div>
                                </div>




                                <div class="row m-3">
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-9 col-md-9 col-sm-12">
                                                <p class="font-weight-bold">Name of SSC Additional Subject & Grade Point:</p>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" class="form-control" name="bs_addsub" id="bs_addsub" placeholder="Additional sub" value="<?php if (isset($_POST['bs_addsub'])) echo $_POST['bs_addsub']; ?>">
                                                <span id="e_bs_addsub" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Grade Point:</label>
                                            </div>
                                            <div class="col-lg-3 col-md-3 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_grade_point" id="bs_grade_point" placeholder="Grade Point" value="<?php if (isset($_POST['bs_grade_point'])) echo $_POST['bs_grade_point']; ?>">
                                                <span id="e_bs_grade_point" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>































                            <div class="1 group">
                                <div class="row  m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">SSC GPA:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <!-- <input type="text" class="form-control" name="s_ssc_gpa" id="s_ssc_gpa" value="<?php if (isset($_POST['ssc_gpa'])) echo $_POST['ssc_gpa']; ?>"> -->

                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="s_ssc_gpa" id="s_ssc_gpa" value="<?php if (isset($_POST['s_ssc_gpa'])) echo $_POST['s_ssc_gpa']; ?>">

                                                <span id="e_ssc_gpa" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total No. of A+:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="number" class="form-control" name="s_total_aplus" id="s_total_aplus" value="<?php if (isset($_POST['s_total_aplus'])) echo $_POST['s_total_aplus']; ?>">
                                                <span id="es_total_aplus" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-12 col-md-12 col-sm-12">
                                                <h6 class="font-weight-bold">(Total availed A+ except Physical Education, Health and Sports, and Career Education)</h6>
                                            </div>
                                        </div>
                                    </div>



                                </div>
                            </div>



                            <div class="2 group">
                                <div class="row  m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">SSC GPA:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="h_ssc_gpa" id="h_ssc_gpa" value="<?php if (isset($_POST['h_ssc_gpa'])) echo $_POST['ssc_gpa']; ?>">
                                                <span id="eh_sc_gpa" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total No. of A+:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="number" class="form-control" name="h_total_aplus" id="h_total_aplus" value="<?php if (isset($_POST['h_total_aplus'])) echo $_POST['h_total_aplus']; ?>">
                                                <span id="eh_total_aplus" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-12 col-md-12 col-sm-12">
                                                <h6 class="font-weight-bold">(Total availed A+ except Physical Education, Health and Sports, and Career Education)</h6>
                                            </div>
                                        </div>
                                    </div>


                                    

                                </div>


                            </div>



                            <div class="3 group">
                                <div class="row  m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">SSC GPA:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="g_ssc_gpa" id="g_ssc_gpa" value="<?php if (isset($_POST['g_ssc_gpa'])) echo $_POST['g_ssc_gpa']; ?>">
                                                <span id="eg_ssc_gpa" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total No. of A+:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="number" class="form-control" name="g_total_aplus" id="g_total_aplus" value="<?php if (isset($_POST['g_total_aplus'])) echo $_POST['g_total_aplus']; ?>">
                                                <span id="eg_total_aplus" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-12 col-md-12 col-sm-12">
                                                <h6 class="font-weight-bold">(Total availed A+ except Physical Education, Health and Sports, and Career Education)</h6>
                                            </div>
                                        </div>
                                    </div>


                                </div>


                            </div>




                            <div class="4 group">
                                <div class="row  m-3">
                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">SSC GPA:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="text" onkeypress="return (event.charCode !=8 && event.charCode ==0 || ( event.charCode == 46 || (event.charCode >= 48 && event.charCode <= 57)))" maxlength="4" class="form-control" name="bs_ssc_gpa" id="bs_ssc_gpa" value="<?php if (isset($_POST['bs_ssc_gpa'])) echo $_POST['bs_ssc_gpa']; ?>">
                                                <span id="ebs_ssc_gpa" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>


                                    <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-5 col-md-5 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total No. of A+:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="number" class="form-control" name="bs_total_aplus" id="bs_total_aplus" value="<?php if (isset($_POST['bs_total_aplus'])) echo $_POST['bs_total_aplus']; ?>">
                                                <span id="ebs_total_aplus" style="color:red; font-weight:bold"></span>
                                            </div>
                                        </div>
                                    </div>



                                    <div class="col-lg-6 col-md-6 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-12 col-md-12 col-sm-12">
                                                <h6 class="font-weight-bold">(Total availed A+ except Physical Education, Health and Sports, and Career Education)</h6>
                                            </div>
                                        </div>
                                    </div>




                                   



                                   



                                </div>


                            </div>






















































                            <div class="row m-3">
                                <div class="col-lg-12 col-md-12 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <h6 class="font-weight-bold">Version of SSC Exam: </h6>
                                        </div>
                                        <div class="form-check col-lg-4 col-md-4 col-sm-12">
                                            <select class="form-select" name="version_ssc" id="version_ssc">

                                                <option value=''>Select SSC Version</option>
                                                <?php
                                                for ($i = 0; $i < count($version); $i++) {

                                                    echo "<option value='" . $version[$i]["VAR_CODE"] . "'>" . $version[$i]["VAR_NAME"] . "</option>";
                                                }

                                                ?>
                                            </select>
                                        </div>

                                        <span id="e_version_ssc" style="color:red; font-weight:bold"></span>
                                    </div>
                                </div>
                            </div>



                            <div class="row  m-3">
                                <div class="col-lg-9 col-md-9 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-9 col-md-9 col-sm-12">
                                            <label for="text" class="text-center font-weight-bold">যমজ ভাই ভর্তি আবেদন করে থাকলে তার এসএসসি রোল ও রেজিস্ট্রেশন নম্বর :</label>
                                        </div>
                                        <div class="col-lg-3 col-md-3 col-sm-12">
                                            <!-- <span class="font-weight-bold">Subjects</span> -->
                                            <input type="text" class="form-control m-2" name="twin_ssc_roll" id="twin_ssc_roll" placeholder="SSC Roll" value="<?php if (isset($_POST['twin_ssc_roll'])) echo $_POST['twin_ssc_roll']; ?>">
                                            <!-- <span id="twin_ssc_roll" style="color:red; font-weight:bold"></span> -->


                                        </div>
                                    </div>
                                </div>
                                <div class="col-lg-3 col-md-3 col-sm-12">
                                    <div class="row">

                                        <div class="col-lg-12 col-md-12 col-sm-12">
                                            <!-- <span class="font-weight-bold">Grade Point</span> -->
                                            <input type="text" class="form-control m-2" name="twin_ssc_regi" id="twin_ssc_regi" placeholder="Registration Number" value="<?php if (isset($_POST['twin_ssc_regi'])) echo $_POST['twin_ssc_regi']; ?>">
                                            <!-- <span id="twin_ssc_regi" style="color:red; font-weight:bold"></span> -->




                                        </div>
                                    </div>
                                </div>
                            </div>





                            <div class="row m-3">
                                <div class="col-lg-12 col-md-12 col-sm-12">
                                    <div class="row">
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <label for="text" class="text-center " style="font-weight: bold;">কলেজ থেকে ক্ষুদে বার্তা (sms) প্রেরণ করার জন্য ছাত্র অথবা অভিভাবকের মোবাইল নম্বর:</label>
                                        </div>
                                        <div class="col-lg-4 col-md-4 col-sm-12">
                                            <input type="number" class="form-control" name="massage_mobile" id="massage_mobile" oninput="validateNumber3(this)" placeholder="Sms mobile Number" value="<?php if (isset($_POST['massage_mobile'])) echo $_POST['massage_mobile']; ?>">
                                            <span id="e_massage_mobile" style="color:red; font-weight:bold"></span>

                                            <!-- <span id="msgs" style="color:red; font-weight:bold"></span> -->

                                        </div>
                                    </div>
                                </div>
                            </div>
                            <h5 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold">ফরম পূরণে কোনো মিথ্যা/ভুল তথ্য দিলে নটর ডেম কলেজে ভর্তির জন্য প্রার্থী অযোগ্য বলে বিবেচিত হবে । </h5>
                            <h5 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold">Captcha Verification সম্পন্ন হলে Submit বাটনে ক্লিক করুন ।</h5>

                            <div style="padding: 20px;" class="text-center">
                                <div class="input-group">
                                    <div id="notcp" class="input-group-append">
                                        <span class="input-group-text"><?php echo $capchaval; ?></span>
                                    </div>
                                    <input type="text" name="iptval" id="iptval" class="form-control input_user" value="" placeholder="Input captcha">
                                    <button class="btn btn-primary" id="Verify">Verify</button>
                                </div>
                            </div>
                            <div class="text-center">

                                <label style="color: red; font-size: large; font-weight: bold;" id="levelcap"></label>
                            </div>

                            <div>
                                <span id="error"></span>
                            </div>

                            <div class="col text-center">
                                <button type="submit" class="btn btn-success m-3" name='submit' id='submit' value="Validate" onclick="return Validate()" disabled>
                                    Submit
                                </button>
                            </div>

                    </div>
    </form>
    </div>
    </div>
    </div>
    </div>


    </form>


    <!-- using online scripts -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.6/umd/popper.min.js" integrity="sha384-wHAiFfRlMFy6i5SRaxvfOCifBUQy1xHdJ/yoi7FRNXMRBu5WHdZYu1hA6ZOblgut" crossorigin="anonymous"></script>
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/js/bootstrap.min.js" integrity="sha384-B0UglyR+jN6CkvvICOB2joaf5I4l3gm9GU6Hc1og6Ls7i6U/mkkaduKaBhlAXv9k" crossorigin="anonymous"></script>
    <script src="//malihu.github.io/custom-scrollbar/jquery.mCustomScrollbar.concat.min.js"></script>
    <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>



    <script>
        $(document).ready(function () {
		$("#ad_cat").change(function () {
			var Dropdown = null;
			$("#ssc_group").empty();

			Dropdown = $("#ssc_group");
			let appCat = $('#ad_cat').val();
			//alert(appCat)
			if (appCat == "1" || appCat == "2") {
				$("#ssc_group").empty();
				$("<option>").val("").text("Select SSC Group").appendTo(Dropdown);
				$("<option>").val("1").text("Science").appendTo(Dropdown);

			}
			if (appCat == "3") {
				$("#ssc_group").empty();
				$("<option>").val("").text("Select SSC Group").appendTo(Dropdown);
				$("<option>").val("1").text("Science").appendTo(Dropdown);
				$("<option>").val("2").text("Humanities").appendTo(Dropdown);
				$("<option>").val("3").text("General").appendTo(Dropdown);
				$("<option>").val("4").text("Business Studies").appendTo(Dropdown);
			}
			if (appCat == "4") {
				$("#ssc_group").empty();
				$("<option>").val("").text("Select SSC Group").appendTo(Dropdown);
				$("<option>").val("1").text("Science").appendTo(Dropdown);
				$("<option>").val("3").text("General").appendTo(Dropdown);
				$("<option>").val("4").text("Business Studies").appendTo(Dropdown);
			}

		})
	})
    </script>



    <!--  <script>
        $('#ad_cat').on('change', function() {
            var ad_cat = this.value;
            $.ajax({
                type: "POST",
                url: "getVersion.php",
                data: 'CAT_CODE=' + ad_cat,
                success: function(result) {
                    console.log(result);
                    $("#version_ssc").html(result);
                }
            });
        });
    </script>

     <script>
        $('#ad_cat').on('change', function() {
            var ad_cat = this.value;
            $.ajax({
                type: "POST",
                url: "getGrp.php",
                data: 'CAT_CODE=' + ad_cat,
                success: function(result) {
                    console.log(result);
                    $("#ssc_group").html(result);
                }
            });
        });
    </script> -->

    <script type='text/javascript'>
        $(document).ready(function() {
            $("#ssc_group").change(function() {
                $(this).find("option:selected").each(function() {
                    var optionValue = $(this).attr("value");
                    if (optionValue) {
                        $(".group").not("." + optionValue).hide();
                        $("." + optionValue).show();
                    } else {
                        $(".group").hide();
                    }
                });
            }).change();
        });

        /*function preview_image(event) 
        {
           var reader = new FileReader();
           reader.onload = function()
           {
              var output = document.getElementById('output_image');
              output.src = reader.result;
           }
           reader.readAsDataURL(event.target.files[0]);
        }*/
        const MAX_WIDTH = 70;
        const MAX_HEIGHT = 80;
        const MIME_TYPE = "image/jpeg";
        const QUALITY = 0.9;

        const input = document.getElementById("file");
        input.onchange = function(ev) {
            const file = ev.target.files[0]; // get the file
            const blobURL = URL.createObjectURL(file);
            const img = new Image();
            img.src = blobURL;
            img.onerror = function() {
                URL.revokeObjectURL(this.src);
                // Handle the failure properly
                console.log("Cannot load image");
            };
            img.onload = function() {
                URL.revokeObjectURL(this.src);
                const [newWidth, newHeight] = calculateSize(img, MAX_WIDTH, MAX_HEIGHT);
                const canvas = document.createElement("canvas");
                canvas.width = newWidth;
                canvas.height = newHeight;
                const ctx = canvas.getContext("2d");
                ctx.drawImage(img, 0, 0, newWidth, newHeight);
                canvas.toBlob(
                    (blob) => {
                        // Handle the compressed image. es. upload or save in local state
                        //displayInfo('Original file', file);
                        //displayInfo('Compressed file', blob);
                    },
                    MIME_TYPE,
                    QUALITY
                );
                var dataURL = canvas.toDataURL();
                document.getElementById('output_image')
                    .setAttribute(
                        'src', dataURL
                    );
                dataURL = dataURL.replace(/^data:image\/[a-z]+;base64,/, "");
                document.getElementById('basedata').value = dataURL;
                console.log(dataURL);
            };
        };

        function calculateSize(img, maxWidth, maxHeight) {
            let width = img.width;
            let height = img.height;

            // calculate the width and height, constraining the proportions
            if (width > height) {
                if (width > maxWidth) {
                    height = Math.round((height * maxWidth) / width);
                    width = maxWidth;
                }
            } else {
                if (height > maxHeight) {
                    width = Math.round((width * maxHeight) / height);
                    height = maxHeight;
                }
            }
            return [width, height];
        }
    </script>
    <script>
        $(document).ready(function() {
            $("#Verify").click(function() {
                var bla = $('#iptval').val();
                var php_var = "<?php echo $capchaval; ?>";
                if (bla === "") {
                    document.getElementById('levelcap').innerHTML = 'To Enable Submit Button Please Verify';
                } else {
                    if (bla === php_var) {
                        document.getElementById('levelcap').innerHTML = 'Successfully Verified. Now You Can Update Your Information.';
                        document.getElementById("submit").disabled = false;
                    } else {
                        document.getElementById("submit").disabled = true;
                        document.getElementById('levelcap').innerHTML = 'Failed To Verify';
                    }
                }

                return false;
            });
        });
        $('#notcp').bind('cut copy paste', function(e) {
            e.preventDefault();
        });
    </script>



  <!-- all name validation starts  -->


  <!-- Full Name of Student starts  -->
  <script>
    function checkLength(input) {
      var maxLength = 60; // Maximum length allowed
      if (input.value.length > maxLength) {
        alert("Student Full Name Must be 60 characters !");
        input.value = input.value.substring(0, maxLength); // Truncate the input value to the maximum length
      }
    }
  </script>

  <!-- Full Name of Student ends  -->
  

  <!-- Father's Name starts  -->
  <script>
    function checkLength1(input) {
      var maxLength = 50; // Maximum length allowed
      if (input.value.length > maxLength) {
        alert("Father's Name Must be 50 characters !");
        input.value = input.value.substring(0, maxLength); // Truncate the input value to the maximum length
      }
    }
  </script>

  <!-- Father's Name ends  -->


   <!-- Mother's Name starts  -->
   <script>
    function checkLength2(input) {
      var maxLength = 50; // Maximum length allowed
      if (input.value.length > maxLength) {
        alert("Mother's Name Must be 50 characters !");
        input.value = input.value.substring(0, maxLength); // Truncate the input value to the maximum length
      }
    }
  </script>

  <!-- Mother's Name ends  -->


  <!-- School Name  starts  -->
  <script>
    function checkLength3(input) {
      var maxLength = 80; // Maximum length allowed
      if (input.value.length > maxLength) {
        alert("School Name Must be 80 characters !");
        input.value = input.value.substring(0, maxLength); // Truncate the input value to the maximum length
      }
    }
  </script>

  <!-- School Name ends  -->
  <!-- all name validation ends  -->


<!-- student mobile number valid starts  -->
<script>
    function validateNumber(input) {
      var number = input.value.trim();
      var numberLength = number.length;
      var errorMessage = document.getElementById('msg');

      if (numberLength > 11) {
        errorMessage.textContent = 'The number should have exactly 11 digits.';
        input.setCustomValidity('The number should have exactly 11 digits.');
      } else {
        errorMessage.textContent = '';
        input.setCustomValidity('');
      }
    }
  </script>
<!-- student mobile number valid ends  -->


<!-- father's mobile number valid starts  -->
<script>
    function validateNumber1(input) {
      var number = input.value.trim();
      var numberLength = number.length;
      var errorMessage = document.getElementById('msgf');

      if (numberLength > 11) {
        errorMessage.textContent = 'The number should have exactly 11 digits.';
        input.setCustomValidity('The number should have exactly 11 digits.');
      } else {
        errorMessage.textContent = '';
        input.setCustomValidity('');
      }
    }
  </script>
<!-- father's mobile number valid ends  -->


<!-- mother's mobile number valid starts  -->
<script>
    function validateNumber2(input) {
      var number = input.value.trim();
      var numberLength = number.length;
      var errorMessage = document.getElementById('msgm');

      if (numberLength > 11) {
        errorMessage.textContent = 'The number should have exactly 11 digits.';
        input.setCustomValidity('The number should have exactly 11 digits.');
      } else {
        errorMessage.textContent = '';
        input.setCustomValidity('');
      }
    }
  </script>
<!-- mother's mobile number valid ends  -->












    <script type="text/javascript">
        function Validate() {
            var ad_cat = document.getElementById("ad_cat");
            var file = document.getElementById("file");
            var full_name = document.getElementById("full_name");
            var stu_mobile = document.getElementById("stu_mobile");
            var religion_1 = document.getElementById("religion_1");
            var religious_sect = document.getElementById("religious_sect");
            var fathers_mobile = document.getElementById("fathers_mobile");
            var mothers_mobile = document.getElementById("mothers_mobile");
            var school_name = document.getElementById("school_name");
            var board = document.getElementById("board");
            var exam_roll = document.getElementById("exam_roll");
            var reg_number = document.getElementById("reg_number");
            var session = document.getElementById("session");
            var exam_year = document.getElementById("exam_year");
            var school_location = document.getElementById("school_location");

            if (ad_cat.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please select Apply for admission to study!");
                return false;
            }


            if (file.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Upload Your Photo!");
                return false;
            }


            if (full_name.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Full Name!");
                return false;
            }


            if (stu_mobile.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Student Mobile Number!");
                return false;
            }

            if (religion_1.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please select Religion!");
                return false;
            }

            if (religious_sect.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Religious Sect");
                return false;
            }


            if (fathers_mobile.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Father's Mobile Number!");
                return false;
            }


            if (mothers_mobile.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Mother's Mobile Number!");
                return false;
            }


            if (school_name.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your School Name!");
                return false;
            }

            if (board.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please select Your Board!");
                return false;
            }

            if (exam_roll.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Exam. Roll No!");
                return false;
            }


            if (reg_number.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Registration No!");
                return false;
            }


            if (session.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Session!");
                return false;
            }

            if (exam_year.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please Enter Your Exam. Year!");
                return false;
            }


            if (school_location.value == "") {
                //If the "Please Select" option is selected display error.
                alert("Please select Your School Location!");
                return false;
            }

           
            return true;
        }
    </script>





 <!-- 5er upor input hobe naa  -->

 <script>
        // Restricts input for the given textbox to the given inputFilter.
        function setInputFilter(textbox, inputFilter, errMsg) {
            ["input", "keydown", "keyup", "mousedown", "mouseup", "select", "contextmenu", "drop", "focusout"].forEach(function(event) {
                textbox.addEventListener(event, function(e) {
                    if (inputFilter(this.value)) {
                        // Accepted value
                        if (["keydown", "mousedown", "focusout"].indexOf(e.type) >= 0) {
                            this.classList.remove("input-error");
                            this.setCustomValidity("");
                        }
                        this.oldValue = this.value;
                        this.oldSelectionStart = this.selectionStart;
                        this.oldSelectionEnd = this.selectionEnd;
                    } else if (this.hasOwnProperty("oldValue")) {
                        // Rejected value - restore the previous one
                        this.classList.add("input-error");
                        this.setCustomValidity(errMsg);
                        this.reportValidity();
                        this.value = this.oldValue;
                        this.setSelectionRange(this.oldSelectionStart, this.oldSelectionEnd);
                    } else {
                        // Rejected value - nothing to restore
                        this.value = "";
                    }
                });
            });
        }


        // Install input filters.

        // setInputFilter(document.getElementById("s_ssc_gpa"), function(value) {
        //     return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) == 5);
        // }, "GPA should be 1 to 5");

        // sciencs starts 

        setInputFilter(document.getElementById("s_bangla"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("s_english"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("s_mathematics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("physics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("chemistry"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("biology"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("highermath"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("s_grade_point"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        // setInputFilter(document.getElementById("s_ssc_gpa"), function(value) {
        //     return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) == 5);
        // }, "GPA should be  5");

        
        // setInputFilter(document.getElementById("s_total_aplus"), function(value) {
        //     return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 10);
        // }, "Total No. of A should be  10");

        setInputFilter(document.getElementById("sb_sub_mark_1"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("sb_sub_mark_2"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("sb_sub_mark_3"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("sb_sub_mark_4"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        // sciencs ends 




        // humanities starts
        // setInputFilter(document.getElementById("h_ssc_gpa"), function(value) {
        //       return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || (parseFloat(value) >= 3 && parseFloat(value) <= 5));
        // }, "GPA should be between 3 and 5"); 

        setInputFilter(document.getElementById("h_bangla"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");   

        setInputFilter(document.getElementById("h_english"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("h_mathematics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("h_science"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("economics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("civics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("geography"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5"); 

        setInputFilter(document.getElementById("h_grade_point"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5"); 


        setInputFilter(document.getElementById("h_sub_mark_1"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("h_sub_mark_2"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("h_sub_mark_3"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("h_sub_mark_4"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");
        // humanities ends 


        // general starts 

        setInputFilter(document.getElementById("g_bangla"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("g_english"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("g_mathematics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("quran"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("hadith"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("aqaid"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");




        setInputFilter(document.getElementById("islamic_history"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("g_sub_mark_1"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("g_sub_mark_2"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("g_sub_mark_3"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("g_sub_mark_4"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5"); 

        setInputFilter(document.getElementById("g_grade_point"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


       

        


        

        // general ends 



        // business starts
        setInputFilter(document.getElementById("bs_bangla"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("bs_english"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("bs_mathematics"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("bs_science"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("accounting"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("finance"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("business_etre"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("bs_sub_mark_1"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("bs_sub_mark_2"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("bs_sub_mark_3"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");


        setInputFilter(document.getElementById("bs_sub_mark_4"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        setInputFilter(document.getElementById("bs_grade_point"), function(value) {
            return /^-?\d*[.,]?\d{0,2}$/.test(value) && (value === "" || parseInt(value) <= 5);
        }, "GPA should be 1 to 5");

        // business ends 


       

        

        

        


        


        


       
    </script>









</body>

</html>