<?php 
//attendece
if($_POST['btaction']=="h_insert_attendence")
{
    $output = array();
    $checkbox = $_POST['stid'];
    $date = htmlspecialchars($_POST['datetime']);
    $date = date('Y-m-d', strtotime(str_replace('-', '/', $date)));


    foreach($checkbox as $chk1){
       
        $sql="call sp_h_attendence('$chk1','".$_POST["Fasalka"]."','".$_POST["p1"]."','".$_POST["p2"]."','".$_POST["p3"]."','".$_POST["p4"]."','".$_POST["p5"]."','".$_POST["p6"]."','".$_POST["p7"]."','".$_POST["remark"]."','$_SESSION[user_id]', '$date')";
  // $output[]= $sql;
         $result = $db->query($sql);

    }
}



?>