<?php
//DB Data
include '../../ASEngine/AS.php'; 
if(!$login->isLoggedIn())
    header("Location: ../../login.php");
$user = new ASUser(ASSession::get("user_id"));
$userInfo = $user->getInfo();

//basic include files
require_once("../../../db.php");

//variables
$inventory_id = $_GET['inventoryid'];
$inventory_name = $_GET['inventoryname'];
$element_id = $_GET['elementid'];
$top_destinationtype = $_GET['topdestinationtype'];
$control_message = $_GET['controlmes'];

mysqli_query($conn, "UPDATE approved_inventory SET topdestination_type = '$top_destinationtype' WHERE inventory_id = '$element_id' ");

mysqli_close($conn);

header("Location: ../../manage-inventory.php?inventoryid=$inventory_id&inventoryname=$inventory_name&message=$control_message&tab=4");
?>