<?php include("../../include/dbconnect.php"); 

if($tax_acctcode == '0')
{
	echo("Sorry You have not opted Tax GL. Data won't be saved");
exit;
}

if($sp_acctcode == '0')
{
	echo("Sorry You have not opted Sales GL. Data won't be saved");
exit;
}

if ( isset($submit) && $submit == "Update")
{
   $result=mysqli_query($conn,"update salestax set reserved_word = '$reserved_word',taxtype='$taxtype',description='$description',tax='$tax',cess='$cess', sgst_acctcode = '$sgst_acctcode',igst_acctcode = '$igst_acctcode',cgst_acctcode= '$cgst_acctcode',sp_acctcode='$sp_acctcode',cess_acctcode = '$cess_acctcode' where record='$record'") or   die(mysqli_error());
}
elseif (isset($submit) && $submit == "Delete")

{
$result=mysqli_query($conn,"delete from salestax where record='$record'") or
die(mysqli_error());
}

?>
<meta http-equiv="refresh" content="0 url=index.html">
