CasperSecurity
<?php
session_start();
include '../../../../web/connection/connection.php';
//food item variables
$food_type = $_REQUEST['food_type'];
$meant_for = $_REQUEST['meant_for'];
$food_item_name = $_REQUEST['food_item_name'];
$created_on = date("Y-m-d");
$created_by = $_SESSION['USER_ID'];
$is_active = 'yes';
//inserting data into fooditem table
$db_handle = new DBController();
$newInsert = $db_handle->tableinsert("INSERT INTO fooditem(food_type,meant_for,food_item_name,created_on,created_by,is_active)
VALUES ('$food_type','$meant_for','$food_item_name','$created_on','$created_by','$is_active')");
if($newInsert == TRUE){
echo 'Data Inserted Successfully';
}else{
echo 'Not Inserted' ;
}
?>