<?php
session_start();
require_once "../init.php";
require_once "../authority.inc.php";

if($_GET['IDProduct']){
$IDProduct = $_GET['IDProduct'];
}
else{
$IDProduct = $_POST['IDProduct'];
}
if($_GET['productid']){
$productid = $_GET['productid'];
}
else{
$productid = $_POST['productid'];}

$sql = "update menu set productid='$productid' WHERE IDProduct=$IDProduct";
	  $DB->query($sql);

echo "1";
$db->close();
header("location:pro_class.php");
?>