<div class="content-wrapper">
    <!-- Content Header (Page header) -->
    <div class="content-header">
      <div class="container-fluid">
        <div class="row mb-2">
          <div class="col-sm-6">
            <h4 class="m-0">Quick Update</h4>
          </div><!-- /.col -->
          <div class="col-sm-6">
            <ol class="breadcrumb float-sm-right">
              <li class="breadcrumb-item">Dashboard</li>
              <li class="breadcrumb-item ">Learner's Data</li>
              <li class="breadcrumb-item ">Manage Learners'</li>
              <li class="breadcrumb-item active">Quick Update</li>
            </ol>
          </div><!-- /.col -->
        </div><!-- /.row -->
      </div><!-- /.container-fluid -->
    </div>
    
    <section class="content">
      <div class="container-fluid">
        <div class="row">
       
        
          <div class="col-md-3 col-sm-6 col-12">
            <div class="info-box">
  
              <div class="info-box-content">
                <center>
                <a type="button" class="btn btn-info" href="Pupils.php?page=Manage">
                  <i class="fa fa-arrow-left"></i> Manage Learners
                </a>
                </center>
              </div>
              <!-- /.info-box-content -->
            </div>
            <!-- /.info-box -->
          </div>
         
          
          </div>
         </div>
    </section>
          
    
    <section class="content">
        <center><label id="messagehere"></label></center>
         <div class="table-responsive" id="tableresponsivee">
                 <table class="table table-bordered tabledatas" id="tablepupils">
                     <thead>
                         <tr>
                             <th>#</th>
                             <th>Name</th>
                             <th>Adm No</th>
                             <th>Class</th>
                             <th>Gender</th>
                             <th>Action</th>
                         </tr>
                     </thead>
                     <tbody>
                            <?php
                        $sql = "select * from pupils ORDER BY Gender ASC, Status ASC,Claz DESC, Names DESC";
                        $result = $con->query($sql);
                        if ($result->num_rows > 0) 
                        {
                            $cnt='1';
                            while($row = $result->fetch_assoc()) 
                            {
                            $sta=$row["Status"];
                            if($sta=='Active')
                            {
                            ?>
                            <tr class="">
                            <td><?php echo $cnt; ?></td>
                            <td><?php echo $row["Sirname"].' '.$row["Names"]; ?></td>
                            <td><?php echo $row["AdmNo"]; ?></td>
                            <td><?php echo $row["Claz"]; ?></td>
                            <td>
                                <select class="form-control custom-select gen">
                                <?php
                                $gen=$row["Gender"];
                                 if($gen=='Female')
                                 {
                                ?>
                                <option selected value="Female">Female</option>
                                <option value="Male">Male</option>
                                 <?php
                                 }else if($gen=='Male')
                                 {
                                 ?>
                                 <option selected value="Boy">Male</option>
                                 <option value="Female">Female</option>
                                 <?php
                                 }else
                                 {
                                 ?>
                                 <option selected value="">Gender ---</option>
                                 <option value="Male">Male</option>
                                 <option value="Female">Female</option>
                                 <?php
                                 }
                                 ?>
                                </select>
                            </td>
          
                            <td>
                                <input type="hidden" name="pupilidholder" class="pupilidholdergender" value="<?php echo $row["count"]; ?>" />
                                <i class="fa fa-save btn text-green btngender" title="Click to save"></i>
                            </td>
                            </tr>   
                            <?php 
                            $cnt=$cnt+1;
                            }
                            }
                        }
                            ?>
                     </tbody>
                 </table> 
              </div>
    </section>
  
</div>

