<?php
session_start();
if (!isset($_SESSION['id'])) {
   header("location: main.php");
}
?>
<?php
$capchaval = substr(str_shuffle("1234abcdefghijkmnpqrABCDEFGHIJKL123456789stvwxyzMNPQRSTVWXYZ56789"), 0, 8);
//session_start();
include "fetch_data.php";
include "connection.php";

$APP_ID = $_SESSION['id'];


$sql5 = "SELECT * FROM AD_RELIGION_MST";
$parse = ociparse($conn, $sql5);
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";
$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);


// $APP_ID = 79;
$sql = "SELECT *  FROM AD_APP  WHERE APP_ID = '$APP_ID'";
$parse = ociparse($conn, $sql);
oci_execute($parse);

// print_r($sql);
while ($row = oci_fetch_assoc($parse)) {
   $user_row[] = $row;
}

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


$sql2 = "SELECT * FROM AD_SSC_GR WHERE GR_CODE = 1";
$parse = ociparse($conn, $sql2);
oci_execute($parse);

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



$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 = "";
$FATHER_PROFESSION = "";
$MOTHER_PROFESSION = "";
$E_MAIL = "";







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']);
               $imdata = base64_encode($im);
           }
         }else{ 
             echo 'Please choose a File'; 
         } 
     }*/
   $imdata = $_POST['basedata'];



   $p_APP_ROLL_NO = $_POST['app_roll'];
   $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'];
   $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'];
   $FATHER_PROFESSION = $_POST['fathers_profession'];
   $MOTHER_PROFESSION = $_POST['mothers_profession'];
   $E_MAIL = $_POST['E_MAIL'];
   $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'];
   //  $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_SUB1 = $_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'];
   $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_SUB1 = $_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'];
   $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_SUB1 = $_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'];
   $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_SUB1 = $_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'];
   $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_HADITH = $_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 = $_POST['ssc_total_mark'];
   $p_SSC_VERSION = $_POST['version_ssc'];
   $SMS_MOBILE_NO = $_POST['massage_mobile'];
   // $p_OTP = random_int(100000, 999999);
  
   $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_UPDATE(:o_status,:APP_ID,: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_SUB1,:EXAM_SUB_NAME2,:GP_EXAM_SUB2,:EXAM_SUB_NAME3,:GP_EXAM_SUB3,:EXAM_SUB_NAME4,:GP_EXAM_SUB4,:p_TB_EXAM_ROLL_NO,:p_TB_REG_NO,:p_GP_ECO,:p_GP_CIVICS,:p_GP_GEO,:p_GP_QURAN,:p_GP_HADITH,:p_GP_AQAID,:p_GP_ISLAM,:p_GP_SCIENCE,:p_GP_FIN,:p_GP_BUSINT,:TOTAL_MARKS,:p_APP_MODE,:FATHER_PROFESSION,:MOTHER_PROFESSION,:E_MAIL); end;");


   oci_bind_by_name($stid, ":o_status", $returnval, -1, SQLT_INT);
   oci_bind_by_name($stid, ":APP_ID", $APP_ID, -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, ":FATHER_PROFESSION", $FATHER_PROFESSION, -1, SQLT_CHR);
   oci_bind_by_name($stid, ":MOTHER_PROFESSION", $MOTHER_PROFESSION, -1, SQLT_CHR);
   oci_bind_by_name($stid, ":E_MAIL", $E_MAIL, -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_SUB1", $GP_EXAM_SUB1, -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_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_HADITH", $p_GP_HADITH, -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);

   oci_free_statement($stid);
   oci_close($conn);
   /*if ($returnval == '0') {
      echo '<script>alert("Please carefully fill up all the fields.")</script>';
   } else if ($returnval == '1') {
      echo '<script>
      alert("Your Application is updated!!");
      // window.location.href = "https://www.itbadmission.com/ndc/view1.php";
      // window.location.href = "http://localhost/ndc_2023/view1.php";
      window.location.href = "https://ndc.iadmissionbd.net/view1.php";
      </script>';
   } else if ($returnval == '2') {
      echo '<script>alert("Your SMS contact number is a duplicate! Please try another number!")</script>';
   }*/
}








?>



<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>Edit Profile</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="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script> -->
   <style>
      select[readonly] {
         background: #eee;
         /*Simular campo inativo - Sugestão @GabrielRodrigues*/
         pointer-events: none;
         touch-action: none;
      }
   </style>
</head>

<body>






   <!-- dashboard start -->
   <?php include 'dashboard.php'; ?>
   <!-- dashboard end -->

   <form action="" method="POST" enctype="multipart/form-data">

      <div class="container">
      
         <div class="card">
         <?php //include 'marquee.php'; ?>
          <?php //include 'marquee1.php'; ?>
          <?php //include 'marquee2.php'; ?>
            <div class="card-body">
               <header class="col-lg-12 col-md-12 col-sm-12 text-center">
                  <img src="assets/img/logo.jpg" alt="NDC" width="100" height="100">
                  <h2>Admission Application Form 2024</h2>
                  <h4>Notre Dame College, Dhaka</h4>
               </header>
               <div class="form-body">
                  <form action="" method="">
                     <div class="row m-3">
                        <div class="col-lg-4 col-md-4 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 ">
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_CAT";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select class="form-select" name="ad_cat" id="ad_cat" readonly="readonly" tabindex="-1" aria-disabled="true" >';
                                 echo '<option value="">Select Your Subject</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['CAT_CODE'] == $user_row[0]['APP_CAT']) {
                                       echo '<option value=' . $row['CAT_CODE'] . ' selected>' . $row['CAT_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['CAT_CODE'] . '>' . $row['CAT_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </div>
                           </div>
                        </div>

                        <div class="col-lg-8 col-md-8 col-sm-12">
                           <div class="row">
                              <div class="col-lg-3 col-md-3 col-sm-12">
                                 <label for="text" class="text-center">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 src="data:image/jpeg;base64,<?php echo $photoout; ?>" id="output_image" width="130px" height="130px"></img>
                                 <input type="text" class="form-control" name="basedata" id="basedata" hidden value="<?php echo $photoout; ?>">
                              </div>
                           </div>
                        </div>

                     </div>

                     
                     <div class="row m-3" hidden>
                        <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">App Roll Number:</label>
                              </div>
                              <div class="col-lg-7 col-md-7 col-sm-12">
                                 <input type="text" class="form-control" name="app_roll" id="app_roll" value="<?php echo $user_row[0]['APP_ROLL_NO']; ?>">
                              </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-5 col-md-5 col-sm-12">
                                 <label for="text" class="text-center">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" oninput="checkLength(this)" value="<?php echo $user_row[0]['STD_NAME']; ?>">
                              </div>
                           </div>
                           <p style="font-size: 15px; margin-left: 5px">(According to SSC Admit Card)</p>
                        </div>
                        <div class="col-lg-5 col-md-5 col-sm-12">
                           <div class="row">
                              <div class="col-lg-6 col-md-6 col-sm-12">
                                 <label for="text" class="text-center">Student's Mobile No:</label>
                                 <span id="msg" style="color:red; font-weight:bold"></span>
                              </div>
                              <div class="col-lg-6 col-md-6 col-sm-12">
                                 <input type="number" class="form-control" name="stu_mobile" id="stu_mobile" value="<?php echo $user_row[0]['STD_MOBILE_NO']; ?>">
                              </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-4 col-md-4 col-sm-12">
                                 <label for="text" class="text-center">Religion:</label>
                              </div>
                              <div class="col-lg-8 col-md-8 col-sm-12 ">
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_RELIGION_MST";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select name="religion_1" id="religion_1" class="form-select" >';
                                 echo '<option value="">Select Your Religion</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['RG_CODE'] == $user_row[0]['RG_CODE']) {
                                       echo '<option value=' . $row['RG_CODE'] . ' selected>' . $row['RG_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['RG_CODE'] . '>' . $row['RG_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </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">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" value="<?php echo $user_row[0]['RG_SECT']; ?>">
                              </div>
                           </div>
                           <p class="col-lg-12 col-md-12 col-sm-12">Shia/Sunni, Brahmana/Kshatriya, Catholic/Baptist</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 ">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" oninput="checkLength1(this)" value="<?php echo $user_row[0]['F_NAME']; ?>">
                              </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 ">Father's Mobile No:</label>
                                 <span id="msgf" style="color:red; font-weight:bold"></span>
                              </div>
                              <div class="col-lg-7 col-md-7 col-sm-12">
                                 <input type="number" class="form-control" name="fathers_mobile" id="fathers_mobile" value="<?php echo $user_row[0]['F_MOBILE_NO']; ?>">
                              </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 ">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" oninput="checkLength2(this)" value="<?php echo $user_row[0]['M_NAME']; ?>">
                              </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 ">Mother's Mobile No:</label>
                                 <span id="msgm" style="color:red; font-weight:bold"></span>
                              </div>
                              <div class="col-lg-7 col-md-7 col-sm-12">
                                 <input type="number" class="form-control" name="mothers_mobile" id="mothers_mobile" value="<?php echo $user_row[0]['M_MOBILE_NO']; ?>">
                              </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 ">Father'sProfession:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="text" class="form-control" name="fathers_profession" id="fathers_profession" placeholder="Enter Father's Profession" value="<?php echo $user_row[0]['FATHER_PROFESSION']; ?>"">
                                        </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 ">Mother's Profession:</label>
                                        </div>
                                        <div class="col-lg-7 col-md-7 col-sm-12">
                                            <input type="text" class="form-control" name="mothers_profession" id="mothers_profession" placeholder="Enter Mother's Profession" value="<?php echo $user_row[0]['MOTHER_PROFESSION']; ?>">
                                        </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">
                                            <label for="email" class="text-center font-weight-bold"style="margin-right:50px">Your Mail Address:</label>
                                        </div>
                                        <div class="col-lg-8 col-md-8 col-sm-12">
                                            <input type="email" class="form-control" name="E_MAIL" id="E_MAIL" placeholder="Enter Your Mail Address"  value="<?php echo $user_row[0]['E_MAIL']; ?>">
                                        </div>
                                    </div>
                                </div>
                            </div>

                     <h5 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold"style="margin-left: 12px">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-4 col-md-4 col-sm-12">
                                 <label for="text" class="text-center ">Full Name of School:</label>
                              </div>
                              <div class="col-lg-8 col-md-8 col-sm-12">
                                 <input type="text" class="form-control" name="school_name" id="school_name" oninput="checkLength3(this)" value="<?php echo $user_row[0]['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 ">Board:</label>
                              </div>
                              <div class="col-sm-12 col-md-8">
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_BOARD";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select name="board" id="board" class="form-select" >';
                                 echo '<option value="">Select Board</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['BOARD_CODE'] == $user_row[0]['BOARD_CODE']) {
                                       echo '<option value=' . $row['BOARD_CODE'] . ' selected>' . $row['BOARD_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['BOARD_CODE'] . '>' . $row['BOARD_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </div>
                           </div>
                        </div>

                        <div class="col-sm-12 col-md-6">
                           <div class="row">
                              <div class="col-sm-12 col-md-5">
                                 <label for="text" class="text-center ">Exam. Roll No:</label>
                              </div>
                              <div class="col-sm-12 col-md-7">
                                 <input type="number" class="form-control" name="exam_roll" id="exam_roll" value="<?php echo $user_row[0]['EXAM_ROLL_NO']; ?>">
                              </div>
                           </div>
                        </div>

                     </div>

                     
                        <div class="row m-3">
                           <div class="row">
                              <div class="col-sm-12 col-md-5">
                                 <label for="text" class="text-center ">Registration No:</label>
                              </div>
                              <div class="col-sm-12 col-md-7">
                                 <input type="number" class="form-control" name="reg_number" id="reg_number" value="<?php echo $user_row[0]['REG_NO']; ?>">
                              </div>
                           </div>
                        </div>

                        <div class="row m-3">
                           <div class="row">
                              <div class="col-sm-12 col-md-4">
                                 <label for="text" class="text-center ">Session:</label>
                              </div>
                              <div class="col-sm-12 col-md-8">
                                 <input type="text" class="form-control" name="session" id="session" value="<?php echo $user_row[0]['SESSION_NO']; ?>">
                              </div>
                           </div>
                        </div>

                        <div class="row m-3">
                           <div class="row">
                              <div class="col-sm-12 col-md-4">
                                 <label for="text" class="text-center ">Exam. Year:</label>
                              </div>
                              <div class="col-sm-12 col-md-7">
                                 <input type="number" class="form-control" name="exam_year" id="exam_year" value="<?php echo $user_row[0]['EXAM_YEAR']; ?>">
                              </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-6 col-sm-12">
                                 <label for="text" class="text-center "style="margin-right:50px">Location of the School:</label>
                              </div>
                              <div class="col-lg-7 col-md-6 col-sm-12">
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_SCHOOL_LOC";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select name="school_location" id="school_location" class="form-select" >';
                                 echo '<option value="">Select Divisional City</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['LOC_CODE'] == $user_row[0]['LOC_CODE']) {
                                       echo '<option value=' . $row['LOC_CODE'] . ' selected>' . $row['LOC_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['LOC_CODE'] . '>' . $row['LOC_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </div>
                           </div>
                        </div>
                        <div class="col-lg-6 col-md-6 col-sm-12">
                           <div class="row">
                              <div class="col-sm-12 col-md-5">
                                 <label for="text" class="text-center font-weight-bold">SSC Group:</label>
                              </div>
                              <div class="col-sm-12 col-md-7 " onclick="myFunction()">
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_SSC_GR";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select name="ssc_group" id="ssc_group" readonly="readonly" class="form-select" >';
                                 echo '<option value="">Select SSC Group</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['GR_CODE'] == $user_row[0]['SSC_GR_CODE']) {
                                       echo '<option value=' . $row['GR_CODE'] . ' selected>' . $row['GR_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['GR_CODE'] . '>' . $row['GR_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </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> -->
                     <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="<?php echo $ssc_group[0]["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"> Bangla:</label>

                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="s_bangla" id="s_bangla" value="<?php echo $user_row[0]['GP_BANG']; ?>">
                                 </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">English:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="s_english" id="s_english" value="<?php echo $user_row[0]['GP_ENG']; ?>">
                                 </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">Religion:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="s_religion"
                                       id="s_religion" value="<?php echo $user_row[0]['GP_RELI']; ?>">
                                 </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">Mathematics:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="s_mathematics" id="s_mathematics" value="<?php echo $user_row[0]['GP_MATH']; ?>">
                                 </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"> Physics(Mandatory)</label>
                                 </div>
                                 <div class="col-lg-4 col-md-4 col-sm-12">
                                    <input type="text" class="form-control" name="physics" id="physics" value="<?php echo $user_row[0]['GP_PHY']; ?>">
                                 </div>
                              </div>
                           </div>
                        </div>
                        <div class="row m-3">

                           <div class="col-lg-4 col-md-4 col-sm-6">
                              <div class="row">
                                 <div class="col-lg-8 col-md-8 col-sm-12">
                                    <label for="text" class="text-center">Chemistry(Mandatory):</label>
                                 </div>
                                 <div class="col-lg-4 col-md-4 col-sm-12">
                                    <input type="text" class="form-control" name="chemistry" id="chemistry" value="<?php echo $user_row[0]['GP_CHE']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-4 col-md-4 col-sm-6">
                              <div class="row">
                                 <div class="col-lg-7 col-md-7 col-sm-12">
                                    <label for="text" class="text-center">Biology(Mandatory):</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="biology" id="biology" value="<?php echo $user_row[0]['GP_BIO']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-4 col-md-4 col-sm-6">
                              <div class="row">
                                 <div class="col-lg-8 col-md-8 col-sm-12">
                                    <label for="text" class="text-center">Higher Math(Mandatory):</label>
                                 </div>
                                 <div class="col-lg-4 col-md-4 col-sm-12">
                                    <input type="text" class="form-control" name="highermath" id="highermath" value="<?php echo $user_row[0]['GP_HMATH']; ?>">
                                 </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"style="margin-right:60px" >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 echo $user_row[0]['EXAM_SUB_NAME1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="sb_sub_name_2" id="sb_sub_name_2" value="<?php echo $user_row[0]['EXAM_SUB_NAME2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="sb_sub_name_3" id="sb_sub_name_3" value="<?php echo $user_row[0]['EXAM_SUB_NAME3']; ?>">


                                            <input type="text" class="form-control m-2" name="sb_sub_name_4" id="sb_sub_name_4" value="<?php echo $user_row[0]['EXAM_SUB_NAME4']; ?>">
                                            
                                        </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 echo $user_row[0]['GP_EXAM_SUB1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="sb_sub_mark_2" id="sb_sub_mark_2" value="<?php echo $user_row[0]['GP_EXAM_SUB2']; ?>">
                                            <span id="e_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 echo $user_row[0]['GP_EXAM_SUB3']; ?>">
                                            <span id="e_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 echo $user_row[0]['GP_EXAM_SUB4']; ?>">
                                            <span id="e_sub_mark_3" 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="">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" value="<?php echo $user_row[0]['ADD_SUB_NAME']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                              <div class="row">
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <label for="text" class="text-center ">Grade Point:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="s_grade_point" id="s_grade_point" value="<?php echo $user_row[0]['GP_ADD_SUB']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total Marks:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="s_total_marks" id="s_total_marks" value="<?php echo $user_row[0]['TOTAL_MARKS']; ?>">
                                            </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"> Bangla:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="h_bangla" id="h_bangla" value="<?php echo $user_row[0]['GP_BANG']; ?>">
                                 </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">English:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="h_english" id="h_english" value="<?php echo $user_row[0]['GP_ENG']; ?>">
                                 </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">Mathematics:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="h_mathematics" id="h_mathematics" value=" <?php echo $user_row[0]['GP_MATH']; ?>">
                                 </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"> Science:</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="h_science" id="h_science" value="<?php echo $user_row[0]['GP_SCI']; ?>">
                                 </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"> Economics:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="economics" id="economics" value="<?php echo $user_row[0]['GP_ECO']; ?>">
                                 </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"> Civics & Citizenship:</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="civics" id="civics" value="<?php echo $user_row[0]['GP_CIVICS']; ?>">
                                 </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"> Geography & Environment:</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="geography" id="geography" value="<?php echo $user_row[0]['GP_GEO']; ?>">
                                 </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 echo $user_row[0]['EXAM_SUB_NAME1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="h_sub_name_2" id="h_sub_name_2" value="<?php echo $user_row[0]['EXAM_SUB_NAME2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="h_sub_name_3" id="h_sub_name_3" value="<?php echo $user_row[0]['EXAM_SUB_NAME3']; ?>"">

                                            <input type="text" class="form-control m-2" name="h_sub_name_4" id="h_sub_name_4" value="<?php echo $user_row[0]['EXAM_SUB_NAME4']; ?>"">
                                            
                                        </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 echo $user_row[0]['GP_EXAM_SUB1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="h_sub_mark_2" id="h_sub_mark_2" value="<?php echo $user_row[0]['GP_EXAM_SUB2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="h_sub_mark_3" id="h_sub_mark_3" value="<?php echo $user_row[0]['GP_EXAM_SUB3']; ?>">


                                            <input type="text" class="form-control m-2" name="h_sub_mark_4" id="h_sub_mark_4" value="<?php echo $user_row[0]['GP_EXAM_SUB4']; ?>">
                                            
                                        </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="">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" value="<?php echo $user_row[0]['ADD_SUB_NAME']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                              <div class="row">
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <label for="text" class="text-center ">Grade Point:</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="h_grade_point" id="h_grade_point" value="<?php echo $user_row[0]['GP_ADD_SUB']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total Marks:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="h_total_marks" id="h_total_marks" value="<?php echo $user_row[0]['TOTAL_MARKS']; ?>">
                                            </div>
                                        </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" style="margin-left:20px"> Bangla:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="g_bangla" id="g_bangla" value="<?php echo $user_row[0]['GP_BANG']; ?>">
                                 </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">English:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="g_english" id="g_english" value="<?php echo $user_row[0]['GP_ENG']; ?>">
                                 </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">Mathematics:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="g_mathematics" id="g_mathematics" value="<?php echo $user_row[0]['GP_MATH']; ?>">
                                 </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">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 echo $user_row[0]['GP_QURAN']; ?>">
                                 </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">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 echo $user_row[0]['GP_ARABIC']; ?>">
                                 </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">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 echo $user_row[0]['GP_AQAID']; ?>">
                                 </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">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 echo $user_row[0]['GP_ISLAM']; ?>">
                                 </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 echo $user_row[0]['EXAM_SUB_NAME1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="g_sub_name_2" id="g_sub_name_2" value="<?php echo $user_row[0]['EXAM_SUB_NAME2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="g_sub_name_3" id="g_sub_name_3" value="<?php echo $user_row[0]['EXAM_SUB_NAME3']; ?>">


                                            <input type="text" class="form-control m-2" name="g_sub_name_4" id="g_sub_name_4" value="<?php echo $user_row[0]['EXAM_SUB_NAME4']; ?>">
                                            
                                        </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 echo $user_row[0]['GP_EXAM_SUB1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="g_sub_mark_2" id="g_sub_mark_2" value="<?php echo $user_row[0]['GP_EXAM_SUB2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="g_sub_mark_3" id="g_sub_mark_3" value="<?php echo $user_row[0]['GP_EXAM_SUB3']; ?>">

                                            <input type="text" class="form-control m-2" name="g_sub_mark_4" id="g_sub_mark_4" value="<?php echo $user_row[0]['GP_EXAM_SUB4']; ?>">
                                            
                                        </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=""style="margin-left:20px">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" value="<?php echo $user_row[0]['ADD_SUB_NAME']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                              <div class="row">
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <label for="text" class="text-center ">Grade Point:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="g_grade_point" id="g_grade_point" value="<?php echo $user_row[0]['GP_ADD_SUB']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total Marks:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="g_total_marks" id="g_total_marks" value="<?php echo $user_row[0]['TOTAL_MARKS']; ?>">
                                            </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" style="margin-left:20px"> Bangla:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="bs_bangla" id="bs_bangla" value="<?php echo $user_row[0]['GP_BANG']; ?>">
                                 </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">English:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="bs_english" id="bs_english" value="<?php echo $user_row[0]['GP_ENG']; ?>">
                                 </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">Mathematics:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="bs_mathematics" id="bs_mathematics" value="<?php echo $user_row[0]['GP_MATH']; ?>">
                                 </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">Science:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="bs_science" id="bs_science" value="<?php echo $user_row[0]['GP_SCI']; ?>">
                                 </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" style="margin-left:20px">Accounting:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="accounting" id="accounting" value="<?php echo $user_row[0]['GP_ACC']; ?>">
                                 </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">Finance & Banking:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="finance" id="finance" value="<?php echo $user_row[0]['GP_FIN']; ?>">
                                 </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">Business Entrepreneurship:</label>
                                 </div>
                                 <div class="col-lg-5 col-md-5 col-sm-12">
                                    <input type="text" class="form-control" name="business_etre" id="business_etre" value="<?php echo $user_row[0]['GP_BUSINT']; ?>">
                                 </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 echo $user_row[0]['EXAM_SUB_NAME1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="bs_sub_name_2" id="bs_sub_name_2" value="<?php echo $user_row[0]['EXAM_SUB_NAME2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="bs_sub_name_3" id="bs_sub_name_3" value="<?php echo $user_row[0]['EXAM_SUB_NAME3']; ?>">

                                            <input type="text" class="form-control m-2" name="bs_sub_name_4" id="bs_sub_name_4" value="<?php echo $user_row[0]['EXAM_SUB_NAME4']; ?>">
                                            
                                        </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 echo $user_row[0]['GP_EXAM_SUB1']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="bs_sub_mark_2" id="bs_sub_mark_2" value="<?php echo $user_row[0]['GP_EXAM_SUB2']; ?>">
                                            

                                            <input type="text" class="form-control m-2" name="bs_sub_mark_3" id="bs_sub_mark_3" value="<?php echo $user_row[0]['GP_EXAM_SUB3']; ?>">

                                            <input type="text" class="form-control m-2" name="bs_sub_mark_4" id="bs_sub_mark_4" value="<?php echo $user_row[0]['GP_EXAM_SUB4']; ?>">
                                            
                                        </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="" style="margin-left:20px">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" value="<?php echo $user_row[0]['ADD_SUB_NAME']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                              <div class="row">
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <label for="text" class="text-center ">Grade Point:</label>
                                 </div>
                                 <div class="col-lg-6 col-md-6 col-sm-12">
                                    <input type="text" class="form-control" name="bs_grade_point" id="bs_grade_point" value="<?php echo $user_row[0]['GP_ADD_SUB']; ?>">
                                 </div>
                              </div>
                           </div>
                           <div class="col-lg-3 col-md-3 col-sm-12">
                                        <div class="row">
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <label for="text" class="text-center font-weight-bold">Total Marks:</label>
                                            </div>
                                            <div class="col-lg-6 col-md-6 col-sm-12">
                                                <input type="text" class="form-control" name="bs_total_marks" id="bs_total_marks" value="<?php echo $user_row[0]['TOTAL_MARKS']; ?>">
                                            </div>
                                        </div>
                                    </div>
                        </div>
                     </div>

                     <div class="row  m-3">
                        <div class="col-lg-3 col-md-3 col-sm-12">
                           <div class="row">
                              <div class="col-lg-6 col-md-6 col-sm-12">
                                 <label for="text" class="text-center"style="margin-left:15px">SSC GPA:</label>
                              </div>
                              <div class="col-lg-6 col-md-6 col-sm-12">
                                 <input type="text" class="form-control" name="ssc_gpa" id="ssc_gpa" value="<?php echo $user_row[0]['SSC_GPA']; ?>">
                              </div>
                           </div>
                        </div>
                        <div class="col-lg-3 col-md-3 col-sm-12">
                           <div class="row">
                              <div class="col-lg-7 col-md-7 col-sm-12">
                                 <label for="text" class="text-center">Total No. of A+:</label>
                              </div>
                              <div class="col-lg-5 col-md-5 col-sm-12">
                                 <input type="text" class="form-control" name="total_aplus" id="total_aplus" value="<?php echo $user_row[0]['TOTAL_APLUS']; ?>">
                              </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="">(Total availed A+ except Physical Education, Health and Sports, and Career Education)</h6>
                              </div>
                           </div>
                        </div>
                     </div>




                     


                     





                     <!-- <div class="row  m-3">
                     <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">
                                            <h6 class="font-weight-bold"> পরীক্ষায় প্রাপ্ত মোট নম্বর (যদি থাকে) </h6>
                                        </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">SSC Total Marks:</label>
                                            </div>
                                            <div class="col-lg-7 col-md-7 col-sm-12">
                                                <input type="number" class="form-control" name="total_marks" id="total_marks" value="<?php echo $user_row[0]['TOTAL_MARKS']; ?>"">
                                                <span id="es_s_total_marks" 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">(পরীক্ষায় মোট নম্বরের ক্ষেত্রে Physical Education, Health and Sports, and Career Education-এ প্রাপ্ত নম্বর যোগ হবে না। )</h6>
                                        </div>
                                    </div>
                                </div>
                     </div> -->




                     <div class="row">
                        <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 style="margin-left:45px">Version of SSC Exam: </h6>
                              </div>
                              <div class="form-check col-lg-4 col-md-4 col-sm-12">
                             
                                 <?php
                                 include 'connection.php';

                                 $sql = "select * from AD_VERSION";
                                 $parseresults = ociparse($conn, $sql);
                                 ociexecute($parseresults);

                                 echo '<select class="form-select" name="version_ssc" id="version_ssc" readonly="readonly" tabindex="-1" aria-disabled="true" >';
                                 echo '<option value="">Version of SSC Exam:</option>';
                                 while ($row = oci_fetch_assoc($parseresults)) {
                                    if ($row['VAR_CODE'] == $user_row[0]['SSC_VERSION']) {
                                       echo '<option value=' . $row['VAR_CODE'] . ' selected>' . $row['VAR_NAME'] . '</option>';
                                    } else {
                                       echo '<option value=' . $row['VAR_CODE'] . '>' . $row['VAR_NAME'] . '</option>';
                                    }
                                 }
                                 echo '</select>';
                                 oci_free_statement($parseresults);
                                 oci_close($conn);
                                 ?>
                              </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" value="<?php echo $user_row[0]['SMS_MOBILE_NO']; ?>" readonly>
                              </div>
                           </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 echo $user_row[0]['TB_EXAM_ROLL_NO']; ?>">
                                   


                                </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 echo $user_row[0]['TB_REG_NO']; ?>">
                                   




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




                     <h6 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold" style="text-align: center;color: red">ফরমে কোনো মিথ্যা/ভুল তথ্য দিলে নটর ডেম কলেজে ভর্তির জন্য প্রার্থী অযোগ্য বলে বিবেচিত হবে । </h6>
                     <h6 class="col-lg-12 col-md-12 col-sm-12 font-weight-bold"style="text-align: center">Captcha Verification সম্পন্ন হলে <span style=color:green;font-size:20px;>Submit</span> বাটনে ক্লিক করুন ।</h6>
                     <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 class="col text-center">
                        <button type="submit" class="btn btn-success m-3" name='submit' id='submit' disabled>
                           Update
                        </button>
                     </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>
      $('#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 = 90;
      const MAX_HEIGHT = 108;
      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>

   <!-- <script>
      function myfun() {
         var stu_mobile = document.getElementById("stu_mobile").value;
         var fathers_mobile = document.getElementById("fathers_mobile").value;
         var mothers_mobile = document.getElementById("mothers_mobile").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_religion = document.getElementById("s_religion").value;
         var s_mathematics = document.getElementById("s_mathematics").value;
         var s_addsub = document.getElementById("s_addsub").value;
         var s_grade_point = document.getElementById("s_grade_point").value;




         var h_bangla = document.getElementById("h_bangla").value;
         var h_english = document.getElementById("h_english").value;
         var h_religion = document.getElementById("h_religion").value;
         var h_mathematics = document.getElementById("h_mathematics").value;
         var h_addsub = document.getElementById("h_addsub").value;
         var h_grade_point = document.getElementById("h_grade_point").value;


         var g_bangla = document.getElementById("g_bangla").value;
         var g_english = document.getElementById("g_english").value;
         var g_addsub = document.getElementById("g_addsub").value;
         var g_grade_point = document.getElementById("g_grade_point").value;


         var bs_bangla = document.getElementById("bs_bangla").value;
         var bs_english = document.getElementById("bs_english").value;
         var bs_religion = document.getElementById("bs_religion").value;
         var bs_mathematics = document.getElementById("bs_mathematics").value;
         var bs_addsub = document.getElementById("bs_addsub").value;
         var bs_grade_point = document.getElementById("bs_grade_point").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 science = document.getElementById("science").value;
         var accounting = document.getElementById("accounting").value;

         var ssc_gpa = document.getElementById("ssc_gpa").value;
         var ssc_total_mark = document.getElementById("ssc_total_mark").value;



         var mobile = /^[0-9]{11}$/;
         var grade = /^[0-5].\d\d$/;



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


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


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


         if (ssc_group == 1) 
         {
            if (s_bangla >=1 && s_bangla < 6) {
               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 < 6) {
               document.getElementById("e_s_english").innerHTML = " ";
            } else {
               document.getElementById("e_s_english").innerHTML = "GPA should be 0 to 5";
               return false;
            }
            if (s_religion >= 1 && s_religion < 6) {
               document.getElementById("e_s_religion").innerHTML = " ";
            } else {
               document.getElementById("e_s_religion").innerHTML = "GPA should be 1 to 5";
               return false;
            }



            if (s_mathematics >= 1 && s_mathematics < 6) {
               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 < 6) {
               document.getElementById("e_physics").innerHTML = " ";
            } else {
               document.getElementById("e_physics").innerHTML = "GPA should be 1 to 5";
               return false;
            }


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

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



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



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

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

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

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

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

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

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

            if (h_grade_point >= 1 && h_grade_point < 6) {
               document.getElementById("e_h_grade_point").innerHTML = " ";
            } else {
               document.getElementById("e_h_grade_point").innerHTML = "GPA should be 1 to 5";
               return false;
            }
         }
         else if(ssc_group == 3) {
            if (g_bangla >= 1 && g_bangla < 6) {
               document.getElementById("e_g_bangla").innerHTML = " ";
            } else {
               document.getElementById("e_g_bangla").innerHTML = "GPA should be 1 to 5";
               return false;
            }

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

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

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



         }
         else if(ssc_group == 4) 
         {

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

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

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

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

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

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

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


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


            if (ssc_total_mark >= 1 && ssc_total_mark < 1100) {
               document.getElementById("e_ssc_total_mark").innerHTML = " ";
            } else {
               document.getElementById("e_ssc_total_mark").innerHTML = "Total mark should be 1 to  1100";
               return false;
            }




      }


   </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  -->

</body>

</html>