CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
// time table variables
$time_table_id = $_REQUEST['time_table_id'];
$academic_session = $_REQUEST['academic_session'];
$class_id = $_REQUEST['class_id'];
$branch_id = $_REQUEST['branch_id'];
$semester = $_REQUEST['semester'];
$no_of_period = $_REQUEST['no_of_period'];
$class_start_date = $_REQUEST['class_start_date'];
$status = $_REQUEST['status'];
$modified_on = date('Y-m-d');
$modified_by = $_SESSION['USER_ID'];
$is_active = 'yes';
// time table period variables
$time_table_period_id = $_REQUEST['time_table_period_id'];
$time_table_id = $_REQUEST['time_table_id'];
$day = $_REQUEST['day'];
$syllabus_id = $_REQUEST['syllabus_id'];
$employee_id = $_REQUEST['employee_id'];
$is_active = 'yes';
// time table day variables
$time_table_day_id = $_REQUEST['time_table_id'];
$time_table_id = $_REQUEST['time_table_id'];
$is_active = 'yes';
// update data into time table table
$db_handle = new DBController();
$newUpdate = $db_handle->runMyUpdate("UPDATE time_table SET time_table_id = '$time_table_id',academic_session ='$academic_session',class_id ='$class_id',branch_id='$branch_id',semester='$semester',no_of_period='$no_of_period',class_start_date='$class_start_date',status='$status',
modified_on='$modified_on',modified_by='$modified_by',is_active='$is_active' WHERE time_table_id = '$host'");
if($newUpdate == TRUE){
echo 'Data updated Successfully in table 1';
// update data into time table period table
$db_handle = new DBController();
$newUpdate2 = $db_handle->runMyUpdate("UPDATE time_table_period SET time_table_period_id = '$time_table_period_id',time_table_id ='$time_table_id',day ='$day',period='$period',start_time='$start_time',end_time='$end_time',syllabus_id='$syllabus_id',employee_id='$employee_id',is_active='$is_active'
WHERE time_table_period_id = '$host'");
if($newUpdate2 == TRUE){
echo 'Data updated Successfully in table 2';
}else{
echo 'Not updated in 2' ;
}
// update data into time table day table
$db_handle = new DBController();
$newUpdate3 = $db_handle->runMyUpdate("UPDATE time_table_day SET time_table_day_id = '$time_table_day_id',time_table_id ='$time_table_id',time_table_day ='$time_table_day',is_active='$is_active' WHERE time_table_day_id = '$host'");
if($newUpdate3 == TRUE){
echo 'Data updated Successfully in table 3';
}else{
echo 'Not updated in 3' ;
}
}else{
echo 'Not updated in 1' ;
}
?>