<?
session_start();

$dob=$y1.'-'.$m1.'-'.$d1;
$crdate=$y.'-'.$m.'-'.$d;
include("opendb.php");
if(strlen($cname)<=0)
{
 print "<script> alert('Invalid Action'); </script>";
 return;
}

print $sql="update insmaster set cname='$cname',acname='$acname', corp='$corp',addr1='$addr1', dist1='$dist1',state1='$state1', pin1='$pin1', phone1='$phone1', addr2='$addr2', dist2='$dist2', state2='$state2', pin2='$pin2', phone2='$phone2',mob='$mob',relation='$relation', father='$father',dob='$dob',email='$email',web='$web',tin='$tin',cst='$cst',kgst='$kgst',cramt='$cramt',crdays='$crdays' where code='$code' and acname='$acname' ";
mysqli_query($db,$sql) or die(mysqli_error($db));

print $sql="update gateentry set insurance='$cname' where insurance='$acname' ";
mysqli_query($db,$sql) or die(mysqli_error($db));

$cname="";
print "<script> document.location='insmast.php' </script>";
?>

