CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
//canteen variables
$canteen_id = $_REQUEST['canteen_id'];
$canteen_code = $_REQUEST['canteen_code'];
$canteen_name = $_REQUEST['canteen_name'];
$canteen_type = $_REQUEST['canteen_type'];
$breakfast = $_REQUEST['breakfast'];
$lunch = $_REQUEST['lunch'];
$snacks = $_REQUEST['snacks'];
$dinner = $_REQUEST['dinner'];
$vendor_name = $_REQUEST['vendor_name'];
$mobile_no = $_REQUEST['mobile_no'];
$address = $_REQUEST['address'];
$agreement_no = $_REQUEST['agreement_no'];
$cp_start_date = $_REQUEST['cp_start_date'];
$cp_end_date = $_REQUEST['cp_end_date'];
$modified_on = date("Y-m-d");
$modified_by = $_SESSION['USER_ID'];
//inserting updated data for editing canteen table
$db_handle = new DBController();
$newUpdate = $db_handle->runMyUpdate("UPDATE canteen SET canteen_code = '$canteen_code',canteen_name ='$canteen_name',canteen_type ='$canteen_type',
breakfast ='$breakfast',lunch='$lunch',snacks='$snacks',dinner='$dinner',vendor_name='$vendor_name',mobile_no='$mobile_no',
address='$address',agreement_no='$agreement_no',cp_start_date='$cp_start_date',cp_end_date='$cp_end_date',modified_on='$modified_on' WHERE canteen_id = '$canteen_id'");
if($newUpdate == TRUE){
echo 'Data updated Successfully';
}else{
echo 'Not updated' ;
}
?>