<?php 
include "config.php";
session_start();
$user=$_SESSION['log'];
$sapcode = $_POST['sapcodeedit'];
$code = $_POST['productcodeedit'];
$name = $_POST['productnameedit'];
$hsn = $_POST['hsnedit'];
$unit = $_POST['unitedit'.$code.''];
$price = $_POST['priceedit'];
$unittokg=$_POST['unittokgedit'];
$tax = $_POST['taxedit'];
$product_category = $_POST['product_category'];
$sql = "update productdetail set  productcode='$code',sap_code='$sapcode',productname='$name',hsn='$hsn',unit='$unit',price='$price',unittokg='$unittokg',tax='$tax',product_category='$product_category',editdate=CURRENT_DATE(),edittime=CURRENT_TIME(),editby='$user',status='updated' where productcode='$code'";
echo $sql;
 $go = mysqli_query($connect,$sql);
  header('Location:itemmaster.php');

?>