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

?>