CasperSecurity
<?php
session_start();
include '../../connection/connection.php';
$unit_name= $_REQUEST['asset_unit_name'];
$location_id= $_REQUEST['location_id'];
$asset_unit_id= $_REQUEST['asset_unit_id'];
$user_id = '1';
$date = date("Y-m-d");
$db_handle = new DBController();
$newInsert = $db_handle->runMyUpdate("UPDATE asset_unit SET asset_unit_name='$unit_name',location_id = '$location_id' ,modified_on = '$date',modified_by = '$user_id' WHERE asset_unit_id='$asset_unit_id'");
if($newInsert === TRUE){
$_SESSION['ERROR_MSG'] = "Success";
$_SESSION['MSG_ALRT'] = "TRUE";
header('location:../../../web/home/modules/setup/assetunit/assetunitgrid.php');
}else{
$_SESSION['ERROR_MSG'] = "Unsuccess";
$_SESSION['MSG_ALRT'] = "FALSE";
header('location:../../../web/home/modules/setup/assetunit/assetunitgrid.php');
}
?>