<?php
$my_sc_code1 = $_REQUEST['school_cod'];
$my_identity1 = $_REQUEST['identity'];

$my_Date = $_REQUEST['my_Date'];
$my_time1 = $_REQUEST['my_time'];

if ($my_identity1=="Soft@193742855@@"){
    if (!empty($my_sc_code1)){
    	// ** Collected School Name with the help of sms_id **//
    	$connect = new mysqli("localhost", "grainhoo_Att", "Att@2020#", "grainhoo_attend");
    	mysqli_set_charset($connect,"utf8");  // Most important steps
    
    	$sql = "SELECT * FROM `st_lst` WHERE `school_cod`='$my_sc_code1'";
    	$result = $connect->query($sql);
    	while ( $row =  mysqli_fetch_array($result, MYSQLI_BOTH))
    	{
    		$reg_no1=$row['reg_no'];
    		$st_name1=$row['st_name'];
    		$st_father1=$row['st_father'];
    		$st_mother1=$row['st_mother'];
    		$cur_cls_id1=$row['cur_cls_id'];
    		$cur_class1=$row['cur_class'];
    		$cur_med_id1=$row['cur_med_id'];
    		$cur_medium1=$row['cur_medium'];
    		$cur_grp_id1=$row['cur_grp_id'];
    		$cur_group1=$row['cur_group'];
    		$section1=$row['section'];
    		$school_cod1=$row['school_cod'];
    		echo $reg_no1.','.$st_name1.','.$st_father1.','.$st_mother1.','.$cur_cls_id1.','.$cur_class1.','.$cur_med_id1.','.$cur_medium1.','.$cur_grp_id1.','.$cur_group1.','.$section1.','.$school_cod1;
    	}
    	$connect->close();
    }
    else
    {
        echo 'School Code Not Found';
    }
}
else
{
    echo 'Wrong identity';
}
?>
