<?php include('include/include.php'); if($_POST['id']){ $date1 = date('Y-m-d',strtotime($_POST['attendance_date'])); $attendance = executework("INSERT into student_attendance (student_id,status,attendance_date,yearOf,create_date) values ('".$_POST['id']."','".$_POST['value']."','". $date1."','".$_POST['yearOf']."','".date('Y-m-d H:i:s')."')"); echo $attendance; } ?>