/home3/vehiclea/public_html/admin-appleiitfoundationschools-com/studentattendance_data.php
<?php
// echo '<pre>';
// print_r($_POST);
$db = mysqli_connect('162.214.81.24','vehiclea_appleIITSchool','Ramesh@465','vehiclea_appleIIT')or die(mysqli_connect_error());
function redirect($url) {
if(headers_sent()) {
?>
<html><head>
<script language="javascript" type="text/javascript">
<!--
window.parent.document.location='<?php print($url);?>';
//-->
</script>
</head></html>
<?php
exit;
} else {
header("Location: ".$url);
exit;
}
}
$count = $_POST['number'];
$query = "INSERT INTO student_attendance (Roll_no,student_name,student_class,section,syllabus,subject,status,attendance_date,yearOf,create_date) values";
for($i=0; $i<$count; $i++)
{
$query .="('".$_POST['student_no'][$i]."','".$_POST['student_name'][$i]."','".$_POST['PClass'][$i]."','".$_POST['Section'][$i]."','".$_POST['syllabus'][$i]."','".$_POST['Subject'][$i]."','".$_POST['attendance'][$i]."','".date('Y-m-d',strtotime($_POST['date'][$i]))."','".$_POST['academic'][$i]."','".$_POST['create_date'][$i]."'),";
}
$finalquery = rtrim($query,',');
$query;
$insert = mysqli_query($db,$finalquery);
if(!empty($insert))
{
redirect('student_attendance_report.php');
}
?>
@LwBee Strong Bypass
Upload File
Create New File