CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
//canteen variables
$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'];
$created_on = date("Y-m-d");
$created_by = $_SESSION['USER_ID'];
//inserting data into canteen table
$db_handle = new DBController();
$newInsert = $db_handle->tableinsert("INSERT INTO canteen (canteen_code,canteen_name,canteen_type,breakfast,lunch,snacks,dinner,vendor_name,mobile_no,address,agreement_no,cp_start_date,cp_end_date,created_on,created_by)
VALUES ('$canteen_code','$canteen_name','$canteen_type','$breakfast','$lunch','$snacks','$dinner','$vendor_name','$mobile_no','$address','$agreement_no','$cp_start_date','$cp_end_date','$created_on','$created_by')");
if($newInsert == TRUE){
echo 'Data Inserted Successfully';
}else{
echo 'Not Inserted' ;
}
?>