<?php

error_reporting(0);
@date_default_timezone_set('Asia/Dhaka');
require_once("db_connect/config.php");
require_once("db_connect/conect.php");
$db = new database();

    $select_school="select * from project_info";
    $cheke_school=$db->select_query($select_school);
    if($cheke_school)
    {
      $fetch_school_information=$cheke_school->fetch_array();
    }
    
?>



<!doctype html>
<html lang="en">
  <head>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <!-- Bootstrap CSS -->
    <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 type="text/javascript" src="jquery-1.11.3.min.js"></script>
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+Bengali:wght@100;200;300;400;500;600;700;800;900&family=Open+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,300;1,400;1,500;1,600;1,700;1,800&display=swap" rel="stylesheet">
    <meta name="Description" content="<?php echo $fetch_school_information['meta_tag'] ?>" />
    <title><?php print $fetch_school_information['title'] ?></title>
    <link rel="shortcut icon" href="logo.png" />


    <style>
    body{
        
        font-family: 'Noto Serif Bengali', serif;
    }
    </style>

  <script type="text/javascript">
  $(document).ready(function()
  {
   
        var checking_html = '<img src="search_group/loading.gif" /> Checking...';
        $('#className').change(function()
        {
            $('#item_result').html(checking_html);
                check_availability();
        }); 

        $('#groupname').change(function()
        {
            $('#check_section').html(checking_html);
                check_compolsary_subject();
                check_selective_subject();
                check_optional_subject();
        }); 
  });

  function check_availability()
{
  
        var class_name = $('#className').val();
        $.post("check_grou_name.php", { className: class_name },
            function(result){
                if(result !=1 )
                {
                    $('#groupname').html(result);
                 
                }
                else
                {
                  
                    $('#groupname').html('');
                     $('#compolsarysubject').html('');
                        $('#selectivesubject').html('');
                     $('#select_optional_subject').html('');

                }
        });

}  


//function to check compolsary subject availability   
function check_compolsary_subject()
{
        var class_name = $('#className').val();
       var group_name = $('#groupname').val();
        $.post("check_compolsary_subject.php", { className: class_name, groupname:group_name},
            function(result){
                //if the result is 1
                if(result != 0 )
                {
                    //show that the username is available
                    $('#compolsarysubject').html(result);
                    
                    $('#check_compol_name').html('');

                }
                else
                {
                    //show that the username is NOT available
                    document.getElementById('check_compol_name').style.color='RED';
                    $('#check_compol_name').html('No Compolsary Subject Name Found');
                   
                    $('#compolsarysubject').html('');

                }
        });

}  
//function to check selective subject availability   
function check_selective_subject()
{
        var class_name = $('#className').val();
        var group_name = $('#groupname').val();
       
        $.post("check_selective_subject.php", { className: class_name,group_name:group_name},
            function(result){
                //if the result is 1
                if(result !=0 )
                {
                    //show that the username is available
                    $('#selectivesubject').html(result);
                    
                    $('#check_selectivenae').html('');

                }
                else
                {
                    //show that the username is NOT available
                    document.getElementById('check_selectivenae').style.color='RED';
                    $('#check_selectivenae').html('No Group Subject Name Found');
                    
                    $('#selectivesubject').html('');

                }
        });

} 
//function to check selective subject availability   
function check_optional_subject()
{
        var class_name = $('#className').val();
        var group_name = $('#groupname').val();
       
        $.post("check_optional_subject.php", { className: class_name,group_name:group_name},
            function(result){
                //if the result is 1
                if(result !=0 )
                {
                    //show that the username is available
                    $('#select_optional_subject').html(result);

                    $('#check_optional_name').html('');

                }
                else
                {
                    //show that the username is NOT available
                    document.getElementById('check_optional_name').style.color='RED';
                    $('#check_optional_name').html('No optional Subject Name Found');
                    
                    $('#select_optional_subject').html('');
                }
        });

}  



function sameAddress()
  {

    
    
    
    
    
    
    
    
    
    

      var checkBox = document.getElementById("check");

      var pa_home_name = $('#pa_home_name').val();
      var pa_village = $('#pa_village').val();
      var pa_post_office = $('#pa_post_office').val();
      var pa_upazila = $('#pa_upazila').val();
      var pa_district = $('#pa_district').val();
  

      if (checkBox.checked == true)
        {
                $('#ra_home_name').val(pa_home_name);
                $('#ra_village').val(pa_village);
                $('#ra_post_office').val(pa_post_office);
                $('#ra_upazila').val(pa_upazila);
                $('#ra_district').val(pa_district);
                
        } 
        else 
        {
              $('#ra_home_name').val("");
              $('#ra_village').val("");
              $('#ra_post_office').val("");
              $('#ra_upazila').val("");
              $('#ra_district').val("");
           
        }

  }



function saveInfo()
{
        var stdrollNo=$("#stdrollNo").val();
          if(stdrollNo=="")
          {
            alert("Enter Your CLass Roll");
            return 0;
          } 
        var Name_en=$("#Name_en").val();
          if(Name_en=="")
          {
            alert("Enter Your Name In English");
            return 0;
          } 

        


          var fathersName=$("#fathersName").val();
        //   if(fathersName=="")
        //   {
        //      alert("Enter Your Father's Name");
        //     return 0;
        //   }   
          var fathers_name_en=$("#fathers_name_en").val();
          if(fathers_name_en=="")
          {
             alert("Enter Your Father's Name In English");
            return 0;
          }   
          var occupation=$("#occupation").val();
        //   if(occupation=="")
        //   {
        //      alert("আপনার পিতার পেশা প্রদান করুন");
        //     return 0;
        //   }   
          var job_location=$("#job_location").val();
        //   if(job_location=="")
        //   {
        //      alert("আপনার পিতার কর্মস্থল প্রদান করুন");
        //     return 0;
        //   }   
            
         

        //   var mothersName=$("#mothersName").val();
        //   if(mothersName=="")
        //   {
        //      alert("Enter Your Mother's Name");
        //     return 0;
        //   } 
        //   var mothers_name_en=$("#mothers_name_en").val();
        //   if(mothers_name_en=="")
        //   {
        //      alert("আপনার মাতার নাম ইংরেজীতে প্রদান করুন");
        //     return 0;
        //   } 
          var mothers_name_en=$("#mothers_name_en").val();
          if(mothers_name_en=="")
          {
             alert("আপনার মাতার নাম ইংরেজীতে প্রদান করুন");
            return 0;
          } 
          var mothers_occupation=$("#mothers_occupation").val();
        //   if(mothers_occupation=="")
        //   {
        //      alert("আপনার মাতার পেশা প্রদান করুন");
        //     return 0;
        //   } 
          var mother_mobile_number=$("#mother_mobile_number").val();
        //   if(mother_mobile_number=="")
        //   {
        //      alert("আপনার মাতার মোবাইল নাম্বার প্রদান করুন");
        //     return 0;
        //   } 


        // if(mother_mobile_number.length!=11)
        // {
        //             alert("মাতার মোবাইল নাম্বারটি ভুল হইছে");
        //             return 0;
                
        // }
          var mother_work_place=$("#mother_work_place").val();
       

         var studentMobile=$("#studentMobile").val();
         
        //   if(studentMobile=="")
        //   {
        //      alert("Enter Student Mobile Number");
        //     return 0;
        //   } 
        

          
          
          
          
  

           
    
       

           


          var className=$("#className").val();
          if(className=="Select One")
          {
             alert("Select Your Class");
            return 0;
          }   

        //   var groupname=$("#groupname").val();
        //   if(groupname=="")
        //   {
        //      alert("Select Your Group");
        //     return 0;
        //   } 

        //   var Session=$("#Session").val();
        //   if(Session=="")
        //   {
        //      alert("Select Your Session");
        //     return 0;
        //   } 
          
       
            //   var guardian_name_bn=$("#guardian_name_bn").val();
            //   if(guardian_name_bn=="")
            //   {
            //      alert("আাপনার অভিভাবকের নাম প্রদান করুন");
            //     return 0;
            //   } 
              var guardian_name_en=$("#guardian_name_en").val();
              if(guardian_name_en=="")
              {
                 alert("আাপনার অভিভাবকের নাম ইংরেজীতে প্রদান করুন");
                return 0;
              } 
              var guardian_occupation=$("#guardian_occupation").val();
            //   if(guardian_occupation=="")
            //   {
            //      alert("আাপনার অভিভাবকের পেশা প্রদান করুন");
            //     return 0;
            //   } 
              var guardian_job_location=$("#guardian_job_location").val();
            //   if(guardian_job_location=="")
            //   {
            //      alert("আাপনার অভিভাবকের পেশা কর্মস্থল প্রদান করুন");
            //     return 0;
            //   } 
              var guardianMobile=$("#guardianMobile").val();
              if(guardianMobile=="")
              {
                 alert("অভিবাবকের মোবাইল নাম্বারটি প্রদান করুন");
                return 0;
              }  
          
            //     if(guardianMobile.length!=11)
            //     {
            //         alert("অভিবাবকের মোবাইল নাম্বারটি ভুল হইছে");
            //          return 0;
            //     }


         
                 

 



    var cmsubject = [];
      $('.cmsub').each(function(){
        if($(this).is(":checked"))
        {
          cmsubject.push($(this).val());
        }
      
      });
      

      
      //var cmlent=$('.cmsub').length;
      //alert(cmlent);
      
 

      var slsubject = [];
      $('.slsub').each(function(){
        if($(this).is(":checked"))
        {
          slsubject.push($(this).val());
        }
      
      });

      if(className=="311611180001andEleven")
      {


      if(slsubject.length>3 || slsubject.length<3)
      {
        alert('Select Three Group  Subject');
        return;
      }

     }



      var optional_subject=$(".opSub").val();
          if(optional_subject=="")
          {
             alert("Select Optional Subject");
            return 0;
          } 

      var form = $('form')[0];
      var formData=new FormData(form);
      var files=$("#file")[0].files;
      if(files.length>0)
      {
        formData.append('file',files[0]);
      }
      
        // $('#btnsave').attr('disabled','disabled');

       $.ajax({
              url:"save_reg_info.php",
              type:"POST",
              data:formData,
              contentType: false,
              processData: false,
              success:function(result){
              //$("#resultshow").html(result);
              var r=parseInt(result);
              if(r==0)
                {
                        alert ("Unsuccessfully");
                        $('#btnsave').removeAttr('disabled');
                }
                else
                {
                             alert ("Save Successfully!!");
                            window.location.href = 'https://gzmcfeni.gov.bd/ems/view_students_details.php?id='+r;
                }
              }
          });


}

   </script>
  </head>
  <body>
    <div class="jumbotron bg-success text-white" style="padding:10px;">
      <div class="container">
          <div class="row">
        <div class="col-md-1 col-3 bg-">
              <img src="logo.png" style="height: 100px; text-align: right;" class=" rounded p-2 " >
       </div>

        <div class="col-md-10 col-9 p-3">
              
         <h4 style="text-shadow:  0px 3px 3px #999;"> <?php print $fetch_school_information['institute_name'] ?></h4>

         <h5 class="text-warning"> Student's Information Form  </h5>
       
 
        </div>
        </div>

</div>
   </div>


<div class="container mt-2 shadow-sm p-3 mb-5  rounded">


<form method="post" id="form" name="form" enctype="multipart/form-data">
    <div class="row">
   <h5 class="text-danger"> Fill up all information in english </h5>
            <div class="col-12">
         
            
         <div class="d-none" >
             <div class="col-6 mt-2 ">
                <label for="reg_phone" class="form-label"> Phone Number :</label>
                <input type="text" class="form-control form-control-sm" id="reg_phone"  name="reg_phone" autocomplete="off" />
            </div>
             <div class="col-6 mt-2">
                <label for="trxid" class="form-label">Transaction ID:</label>
                <input type="text" class="form-control form-control-sm" id="trxid"  name="trxid" autocomplete="off" />
            </div>
            
             <div class="col-6 mt-2">
                 <label for="className" class="form-label">Select Class (Which class you want to admit)</label>
   
               <!--<select name="className" id="className" class="form-control form-control-sm"> -->
                <!--  <option value="311611180001andEleven">Eleven</option>-->
                <!--</select>-->
            </div>
            
            <div class="col-6 mt-2">
                <label for="trxdate" class="form-label">Date:</label>
                <input type="text" class="form-control form-control-sm" id="trxdate" name="trxdate" value="<?php print date('d-m-Y')?>">
            </div>
            
    </div>
    
  
    <div class="col-12">
         
            <label class="form-label mt-2"> <b>Student's Information :</b></label>  
         <div class="row" style="border: 1px dashed lightgray;padding:10px;">
             <div class="col-6 mt-2 d-none">
                <label for="Name" class="form-label">Student's Name (Bangla) :</label>
                <input type="text" class="form-control form-control-sm" id="Name"  name="Name" autocomplete="off"/>
            </div>
              <div class="col-6 mt-2">
                <label for="Name_en" class="form-label">CLass Roll No. :</label>
                <input type="text" class="form-control form-control-sm" id="stdrollNo"  name="stdrollNo" autocomplete="off"  required="" />
            </div>
            
            
             <div class="col-6 mt-2">
                <label for="Name_en" class="form-label">Student's Name :</label>
                <input type="text" class="form-control form-control-sm" id="Name_en"  name="Name_en" autocomplete="off"  />
            </div>
            
     <div class="col-6 mt-2 ">
        <label for="date_of_birth" class="form-label">Date of birth (Day-Month-Year):</label>
        <input type="text" class="form-control form-control-sm" id="date_of_birth" name="date_of_birth" autocomplete="off" required="">
    </div>
             <div class="col-6 mt-2 d-none">
                <label for="birth_nid_no" class="form-label">Student's Birth Reg. No.:</label>
                <input type="text" class="form-control form-control-sm" id="birth_nid_no"  name="birth_nid_no" autocomplete="off"/>
            </div>
            
            
    
     
         
         <input type="hidden" class="form-control form-control-sm" id="gender"  name="gender" value="Female"/>
         
        

    
    
        <div class="col-6 mt-2">
        <label for="religion" class="form-label">Religion:</label>
         <select name="religion" id="religion" class="form-control">
            <option value="">Select religion</option>
            <option value="Islam">Islam</option>
            <option value="Hindu">Hindu</option>
            <option value="Buddhist">Buddhist</option>
            <option value="Christian">Christian</option>
         </select>
    </div>

            <div class="col-6 mt-2 ">
                <label for="studentMobile" class="form-label">Student's Mobile No.:</label>
                <input type="number" class="form-control form-control-sm" id="studentMobile" name="studentMobile" autocomplete="off" >
          </div>

            <div class="col-6 mt-2 d-none">
                <label for="file" class="form-label">Student's Image</label>
                <input type="file"  id="file"  name="file"  class="form-control form-control-sm">
          </div>
         </div>
    </div>
    

    
    <div class="col-12 mt-3">
        
          <label class="form-label"> <b>Father's Information :</b></label>  
        <div class="row" style="border : 1px dashed lightgray;padding:10px;">
            <div class="col-6 mt-2 d-none">
                <label for="fathersName" class="form-label">Father's Name (Bangla):</label>
                <input type="text" class="form-control form-control-sm" id="fathersName"  name="fathersName" autocomplete="off" >
          </div> 
            <div class="col-6 mt-2">
                <label for="fathers_name_en" class="form-label">Father's Name :</label>
                <input type="text" class="form-control form-control-sm" id="fathers_name_en"  name="fathers_name_en" autocomplete="off" >
          </div> 
          
           <div class="col-6 mt-2 ">
                <label for="father_phone" class="form-label">Mobile No.:</label>
                <input type="number" class="form-control form-control-sm" id="father_phone"  name="father_phone" autocomplete="off">
          </div>
           <div class="col-6 mt-2">
                <label for="mothers_name_en" class="form-label">Mother's Name :</label>
                <input type="text" class="form-control form-control-sm" id="mothers_name_en" name="mothers_name_en" autocomplete="off">
          </div>
          
            <div class="col-6 mt-2 d-none">
                <label for="father_nid_no" class="form-label">NID No.:</label>
                <input type="text" class="form-control form-control-sm" id="father_nid_no"  name="father_nid_no" autocomplete="off">
          </div> 

            <div class="col-6 mt-2 d-none">
                <label for="father_education" class="form-label">Academic Qualification:</label>
                <input type="text" class="form-control form-control-sm" id="father_education"  name="father_education" autocomplete="off">
          </div> 
            <div class="col-6 mt-2 d-none">
                <label for="occupation" class="form-label">Profession:</label>
                <input type="text" class="form-control form-control-sm" id="occupation"  name="occupation" autocomplete="off">
          </div> 
            <div class="col-6 mt-2 d-none">
                <label for="job_location" class="form-label">Job Place:</label>
                <input type="text" class="form-control form-control-sm" id="job_location"  name="job_location" autocomplete="off">
          </div> 
            
        </div>
    </div>
    
    <div class="col-12 mt-3 d-none" >
     
        <div class="row" style="border: 1px dashed lightgray;padding:10px;">
            <div class="col-6 mt-2 d-none" >
                <label for="mothersName" class="form-label">Mother's Name (Bangla):</label>
                <input type="text" class="form-control form-control-sm" id="mothersName" name="mothersName" autocomplete="off" >
          </div>
           
            <div class="col-6 mt-2 d-none">
                <label for="mothers_nid_no" class="form-label">NID No.:</label>
                <input type="text" class="form-control form-control-sm" id="mothers_nid_no" name="mothers_nid_no" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none">
                <label for="mothers_edcuation" class="form-label">Academic Qualification:</label>
                <input type="text" class="form-control form-control-sm" id="mothers_edcuation" name="mothers_edcuation" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none ">
                <label for="mothers_occupation" class="form-label">Profession:</label>
                <input type="text" class="form-control form-control-sm" id="mothers_occupation" name="mothers_occupation" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none">
                <label for="mother_work_place" class="form-label">Job Place:</label>
                <input type="text" class="form-control form-control-sm" id="mother_work_place" name="mother_work_place" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none">
                <label for="mother_mobile_number" class="form-label">Mobile No.:</label>
                <input type="number" class="form-control form-control-sm" id="mother_mobile_number" name="mother_mobile_number" autocomplete="off">
          </div>
        </div>
    </div>
        
    <!--<div class="col-12">-->
    <!--     <div class="form-check col-lg-2 col-12">-->
    <!--          <input class="form-check-input" type="checkbox" name="died" id="guardianDied" value="1">-->
    <!--          <label class="form-check-label" for="orphane">-->
    <!--          Put tick mark if guardian is another man-->
    <!--          </label>-->
    <!--    </div>-->
    <!--</div>-->
        
    <div class="col-12 mt-3">
        <label class="form-label"> <b>Guardian's Information : </b></label> 
        <div class="row" style="border: 1px dashed lightgray;padding:10px;">
            <div class="col-6 mt-2 d-none">
                <label for="guardian_name_bn" class="form-label">Guardian's Name (Bangla):</label>
                <input type="text" class="form-control form-control-sm" id="guardian_name_bn" name="guardian_name_bn" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="guardian_name_en" class="form-label">Guardian's Name :</label>
                <input type="text" class="form-control form-control-sm" id="guardian_name_en" name="guardian_name_en" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none">
                <label for="guardian_nid_no" class="form-label">NID No.:</label>
                <input type="text" class="form-control form-control-sm" id="guardian_nid_no" name="guardian_nid_no" autocomplete="off">
          </div>
            <div class="col-6 mt-2 d-none">
                <label for="guardian_education" class="form-label">Academic Qualification:</label>
                <input type="text" class="form-control form-control-sm" id="guardian_education" name="guardian_education" autocomplete="off">
          </div>    

           <div class="col-6 mt-2">
                <label for="relation_with_std" class="form-label">Relation with Student :</label>
                <input type="text" class="form-control form-control-sm" id="relation_with_std" name="relation_with_std" autocomplete="off">
          </div>

         <div class="col-6 mt-2 d-none">
                <label for="guardian_occupation" class="form-label">Profession:</label>
                <input type="text" class="form-control form-control-sm" id="guardian_occupation" name="guardian_occupation" autocomplete="off">
          </div>

            <div class="col-6 mt-2 d-none">
                <label for="guardian_job_location" class="form-label">Job Place:</label>
                <input type="text" class="form-control form-control-sm" id="guardian_job_location" name="guardian_job_location" autocomplete="off">
          </div>
         <div class="col-md-6 mt-2">
            <label for="guardianMobile" class="form-label">Mobile No.:</label>
            <input type="number" class="form-control form-control-sm" id="guardianMobile" name="guardianMobile" autocomplete="off" >
          </div>
        </div>
    </div>
    
    
    <div class="col-12 d-none">
        <b>Put tick mark in right box</b>
        <div class="row">
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="orphane" value="এতিম">
                  <label class="form-check-label" for="orphane">
                   এতিম
                  </label>
            </div>
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="autistick" value="প্রতিবন্ধী">
                  <label class="form-check-label" for="autistick">
                   প্রতিবন্ধী
                  </label>
            </div>
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="freedom_fighter_son" value="মুক্তিযোদ্ধার সন্তান">
                  <label class="form-check-label" for="freedom_fighter_son">
                   মুক্তিযোদ্ধার সন্তান
                  </label>
            </div>
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="river_break_son" value="নদীভাঙ্গন পরিবারের সন্তান">
                  <label class="form-check-label" for="river_break_son">
                   নদীভাঙ্গন পরিবারের সন্তান
                  </label>
            </div>
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="poor_family_son" value="দুস্থ পরিবারের সন্তান">
                  <label class="form-check-label" for="poor_family_son">
                   দুস্থ পরিবারের সন্তান
                  </label>
            </div>
            <div class="form-check col-lg-2 col-12">
                  <input class="form-check-input" type="radio" name="quota" id="others" value="অন্যান্য">
                  <label class="form-check-label" for="others">
                   অন্যান্য
                  </label>
            </div>
        </div>
    </div>

  
  <div class="col-12 mt-3">
        <label class="form-label"> <b>Permanent  Address: </b></label>  

        <div class="row" style="border: 1px dashed lightgray;padding:10px;">
            <div class="col-6 mt-2">
                <label for="pa_home_name" class="form-label">House Name:</label>
                <input type="text" class="form-control form-control-sm" id="pa_home_name" name="pa_home_name" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="pa_village" class="form-label">Village:</label>
                <input type="text" class="form-control form-control-sm" id="pa_village" name="pa_village" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="pa_post_office" class="form-label">P.O.:</label>
                <input type="text" class="form-control form-control-sm" id="pa_post_office" name="pa_post_office" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="pa_upazila" class="form-label">Upozila:</label>
                <input type="text" class="form-control form-control-sm" id="pa_upazila" name="pa_upazila" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="pa_district" class="form-label">District:</label>
                <input type="text" class="form-control form-control-sm" id="pa_district" name="pa_district" autocomplete="off">
          </div>
        </div>
    </div>

    
  <div class="col-12 mt-3 ">
    <label class="form-label"> <b>Present Address:</b></label> 
    <label> 
    <input type="checkbox"   id="check" onclick="sameAddress()" style="height: 15px; width: 15px;"> </input>&nbsp;
</label>
        <label>Click check box if both address are same</label>



        <div class="row"  style="border: 1px dashed lightgray;padding:10px;">
            <div class="col-6 mt-2">
                <label for="ra_home_name" class="form-label">House Name:</label>
                <input type="text" class="form-control form-control-sm" id="ra_home_name" name="ra_home_name" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="ra_village" class="form-label">Village:</label>
                <input type="text" class="form-control form-control-sm" id="ra_village" name="ra_village" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="ra_post_office" class="form-label">P.O.:</label>
                <input type="text" class="form-control form-control-sm" id="ra_post_office" name="ra_post_office" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="ra_upazila" class="form-label">Upozila:</label>
                <input type="text" class="form-control form-control-sm" id="ra_upazila" name="ra_upazila" autocomplete="off">
          </div>
            <div class="col-6 mt-2">
                <label for="ra_district" class="form-label">District:</label>
                <input type="text" class="form-control form-control-sm" id="ra_district" name="ra_district" autocomplete="off">
          </div>
        </div>
    </div>
    


      <div class="col-6 mt-3 d-none">
        <label for="nationality" class="form-label">Nationality:</label>
        <input type="text" class="form-control form-control-sm" id="nationality" name="nationality" autocomplete="off" value="Bangladeshi">
    </div>


    
    <div class="col-12 d-none">
        
            <label class="form-label"> <b>Previous Institution : </b></label>  
        <input type="hidden" name="board_exam_name" value="এস.এস.সি/দাখিল/সমমান">
        <div class="row " style="border: 1px dashed lightgray;padding:10px;">
                <div class="col-6 mt-2">
                <label for="previousClass">Previous Class:</label>
                <input type="text" id="previousClass" name="previousClass" class="form-control form-control-sm"  value="<?php print $rn;?>" >
            </div>
               <div class="col-6 mt-2">
                <label for="board_exam_reg_no">Roll:</label>
                <input type="number" id="board_exam_reg_no" name="board_exam_reg_no" class="form-control form-control-sm">
            </div>
            <div class="col-6 mt-2">
                <label for="board_exam_passyear">Year</label>
                <input type="number" id="board_exam_passyear" name="board_exam_passyear" class="form-control form-control-sm">
            </div>
            <div class="col-6 mt-2">
                <label for="board_exam_institute_name">Institute Name:</label>
                <input type="text" id="board_exam_institute_name" name="board_exam_institute_name" class="form-control form-control-sm">
            </div>
         
        
            <div class="col-6 mt-2 d-none">
                <label for="board_exam_session">শিক্ষাবর্ষ</label>
                <input type="text" id="board_exam_session" name="board_exam_session" class="form-control form-control-sm">
            </div>
            <div class="col-6 mt-2 d-none">
                <label for="board_exam_pass_gpa">প্রাপ্ত জিপিএ</label>
                <input type="text" id="board_exam_pass_gpa" name="board_exam_pass_gpa" class="form-control form-control-sm">
            </div>
        </div>
    </div>

       


    <div class="col-12 ">
        
            <label class="form-label"> <b>Academic Information : </b></label>  
        
        <div class="row " style="border: 1px dashed lightgray;padding:10px;">

  <div class="col-md-4 mt-3">
    <label for="className" class="form-label">ক্লাস নির্বাচন করুন</label>
   
   <select name="className" id="className" class="form-control form-control-sm" onchange="return check_availability()"> 
        <option>নির্বাচন করুন</option>
        
        <?php
            $sql=$db->link->query("select * from `add_class`");
            while($fetch=$sql->fetch_array()){
                ?>
                <option value="<?php print $fetch[0].'and'.$fetch[2]?>"><?php print $fetch[2] ?></option>
                <?php
            }
        ?>
        
    </select>
  </div>

  <div class="col-md-4 mt-3">
    <label for="groupname" class="form-label">গ্রুপ নির্বাচন করুন</label>
    <select name="groupname" id="groupname" class="form-control form-control-sm" >
      <option value="" disabled="" selected="">নির্বাচন করুন</option>
      
    </select>
  </div> 

  <div class="col-md-4 mt-3">
    <label for="Session" class="form-label">সেশন</label>
    <select id="Session" name="Session" class="form-select">
     
       <option>2023-2024</option>
       <option>2024-2025</option>
    </select>
  </div>

<div class="col-md-4 mt-2">
    <strong>Compulsory Subject:</strong><br>
                
      <p id="compolsarysubject"></p> 


  </div>

  <div class="col-md-4 mt-2">
    <strong>Select Group Subject: (Group Science, Business, Humanities হলে  ৩টি বিষয় সিলেক্ট করুন  )</strong><br>
                
      <span id="selectivesubject"></span>


  </div>

  <div class="col-md-4 mt-2">
   <strong>Select Optional Subject &nbsp; : ১টি বিষয় সিলেক্ট করুন  </strong><br>
                
      <span id="select_optional_subject"></span>


  </div>

  <div class="col-12 "><br>
    <button type="button" class="btn btn-success" onclick="return saveInfo()" id="btnsave"> সাবমিট করুন </button>
  </div>
  </div>
  </div>
</form>

 

 </div><br>
  <div class="col-12  p-2 pt-3 " style="text-align: right; background: #f5f5f5">
     <h5> Developed by : &nbsp; <a href="https://sbit.com.bd" class="text-light" target="_blank"><img src="https://sbit.com.bd/fronted/assets/img/logo.png" alt="" width="100px"> </a></h5>
  </div>


  </body>
</html>
