
<?php
include_once "config.php";


if ($_POST['classname']!="") {

    //$class_name = $_POST['classname'];

    //$class_name = 'ELEVEN';


    $class_name = mysqli_real_escape_string($link,$_POST['classname']);

    $sql= "SELECT a.st_id as st_id,a.st_name as st_name,a.st_class as st_class, a.st_email as st_email ,b.class_id as class_id 
   
    FROM 
    student_class a
    inner join
    class_name b

    on a.st_class=b.st_class
    WHERE b.class_id IN ($class_name)
    
    ";




$result = mysqli_query($link,$sql);
$nCount=0;




// echo '<table id="sms-table" class="table table-striped table-responsive"   border="0" width="100%" 
//  cellpadding="5px" style="height: 500px; overflow: auto; font-size: 12px;">';
 

// echo '<tr>
// <th><label class="form-check-label">
//                 <input type="checkbox" id="allCheck" class="checkbox_sms" value="BA" > Check All
//               </label></th>


// <th>ID</th>
// <th>Name</th>
// <th>Class</th>
// <th>Mobile</th>
// </tr>';



while($row = mysqli_fetch_assoc($result)){

	$nCount++;
   //<td>'.$nCount.'</td>
    echo '<tr>
    
    <td><input type="checkbox" id="checkAll" name="selected_id[]" class="checkboxsms" value="'.$row['st_email'].'"> </td>
    <td>'.$row['st_id'].'</td>
    <td>'.$row['st_name'].'</td>
    <td>'.$row['st_class'].'</td>
    <td>'.$row['st_email'].'</td>
    <td>'.$nCount.'</td>
    </tr>';
}
  
mysqli_close($link);
//echo '</table>';





}
?>

