<?php

session_start();

include "../db.php";

date_default_timezone_set('Asia/Kolkata');

$currentTime = date('M j, Y g:i a');



    $a_id = $_POST["id"];

    $attn = $_POST["attn"];

    // $fetch_a_details_run = mysqli_query($con, "SELECT * FROM attendance WHERE ref = '$attendance_ref'");

    // $a_details_row = mysqli_fetch_assoc($fetch_a_details_run);



    $ins_sql = "UPDATE attendance_2 SET stu_attendance = '$attn',a_update_date = '$currentTime' WHERE a_id = '$a_id'";

    mysqli_query($con, $ins_sql);

?>