<?
session_start();
if(strlen($brcode)<=0)
{
  print "<script> alert('Invalid User'); parent.document.location='ind.php' </script>";
  return;
}
include("../opendb.php");
include("../test.php");
$recdate=$ry.'-'.$rm.'-'.$rd;
if(strlen($recdate)>3)
{
mysqli_query($db,"delete from breco where jvno='$jvno' and bank='$bank' and brcode='$brcode'");
$sql="insert into breco values('$jvno','$bdate','$recdate','$user','$brcode','$bank')";
mysqli_query($db,$sql) or die(mysqli_error($db));
}
?>
<script>
 document.location='breco.php?df=<?print $df?>&dto=<?print $dto?>&bnk=<?print $bank?>';
</script>
