<? session_start();
if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
include("../opendb.php");
include("../test.php");
//mysqli_query($db,"alter table veh_purchase add newconfig varchar(200)");
$re=mysqli_query($db,"select da,invno from invoice_item where brcode='$brcode'");
while($row=mysqli_fetch_array($re))
{
 $ss=mysqli_query($db,"select chasis from veh_invoice where da='$row[da]' and invno='$row[invno]'");
 $chrow=mysqli_fetch_array($ss);
 $sql="update invoice_item set chasis='$chrow[0]' where da='$row[da]' and invno='$row[invno]'";
mysqli_query($db,$sql) or die(mysqli_error());
}
?>
