<?php 
include "config.php";
session_start();
$user=$_SESSION['log'];
$code = $_POST['codeedit'];
$name = $_POST['customernameedit'];
$mobile = $_POST['mobileedit'];
$customertype = $_POST['customertypeedit'];
$salestype = $_POST['salestypeedit'];
$credit=$_POST['creditedit'];
$invoicelimit = $_POST['invoicelimitedit'];
$opening = $_POST['openingedit'];
$pincode=$_POST['pincodeedit'];
$address = $_POST['addressedit'];
$state=$_POST['stateedit'];
$district = $_POST['districtedit'];
$gst = $_POST['gstedit'];
$single_entry = $_POST['forsingleentry'];
$sql = "update  customerdetails set code='$code',name='$name',mobile='$mobile',customertype='$customertype',salestype='$salestype',creditlimit='$credit',gst='$gst',invoicelimit='$invoicelimit',openingbalance='$opening',pincode='$pincode',address='$address',district='$district',state='$state',single_entry='$single_entry',editdate=CURRENT_DATE(),edittime=CURRENT_TIME(),editby='$user',status='updated' where code = '$code'";
echo $sql;
 $go = mysqli_query($connect,$sql);
  //header('Location:mastercustomer.php');

?>