CasperSecurity
<?php
session_start();
include '../../../web/connection/connectionv2.php';
$dimension = $_REQUEST['dimension'];
$userId = $_SESSION['USER_ID'];
$date = date("Y-m-d");
$active = 'yes';
if(!empty($dimension)){
$db_handle = new DBController();
$newInsert = $db_handle->tableinsert("INSERT INTO canteen_dimensions(dimension,created_on,created_by,is_active)
VALUES ('$dimension','$date','$userId','$active')");
if($newInsert == TRUE){
$_SESSION['ERROR_MSG'] = "Success";
$_SESSION['MSG_ALRT'] = "TRUE";
header('location:../../../web/home/modules/university/Canteen/dimension/dimension_grid.php');
}else{
$_SESSION['ERROR_MSG'] = "Unsuccess";
$_SESSION['MSG_ALRT'] = "FALSE";
header('location:../../../web/home/modules/university/Canteen/dimension/dimension_grid.php');
}
}
?>