CasperSecurity
<?php
session_start();
include'../../../../../connection/connection.php';
$connection = new createConnection();
$connection->connect();
$class_id = $_REQUEST['class_id'];
$class_name = $_REQUEST['class_name'];
$class_short_name = $_REQUEST['class_short_name'];
$no_year = $_REQUEST['no_year'];
$no_semester = $_REQUEST['no_semester'];
$date = date('Y-m-d');
$userId = $_SESSION['userId'];
$is_active = $_REQUEST['is_active'];
if($is_active == 'Active'){
$status = 'yes';
}else{
$status = 'no';
}
$newUpdate = "UPDATE class SET class_id = '$class_id',class_name ='$program_name',class_short_name ='$program_short_name',
no_year = '$no_year',no_semester ='$no_semester',modified_on = '$date',modified_by = '".(int)$userId."',is_active='$status' WHERE class_id = '$host'");
if(mysqli_query($connection->myconn,$newUpdate) === TRUE ){
$_SESSION['ERROR_MSG'] = "Data Updated Successfully";
$_SESSION['MSG_ALRT'] = "TRUE";
//header('location:../../../../web/home/modules/university/Library/itemtype/item_type.php');
header('location:programm.php');
} else {
$_SESSION['ERROR_MSG'] = "Data Updated Unsuccessfully";
$_SESSION['MSG_ALRT'] = "FALSE";
//header('location:../../../../web/home/modules/university/Library/itemtype/item_type.php');
header('location:programm.php');
}
?>