<? 
session_start();
include("../opendb.php");
include("../test.php");

if(strlen($brcode)<=0)
{
 print "<script> alert('Session timed out'); parent.document.location='../ind.php'; </script>";
 return;
}
if($save)
{
 $r=mysqli_query($db,"select * from dup_rec where recno='$no' where brcode='$brcode'");
 if(mysqli_num_rows($r)>0)
 {
  print "<script> alert('Duplicate Rec. No')"; 
 }
}
?>
<style>
body,td,th{font-family:'arial narrow';letter-spacing:1;font-size:14}
th{background-color:green;color:white}
.mnu{margin-left:5}
</style>
<body bgcolor='ivory'>
<center>
<form action='<?print $PHP_SELF?>'>
<table border=1>
<tr><td>
<table>
<tr bgcolor='silver'><td colspan=2 align=center><b>RECEIPT</td></tr>
<tr><td>Rec No. </td><td><input type=text name='no' size=10></td></tr>
<tr><td>Name </td><td><input type=text name='na' size=40></td></tr>
<tr><td>Address </td><td><textarea name='addr' cols=40></textarea></td></tr>
<tr><td>Type </td><td><select name='ptype'><option>Cash</option> <option>Cheque</option></td></tr>
<tr><td>Cheque No. </td><td><input type=text name='chno' size=20></td></tr>
<tr><td>Amount  </td><td><input type=text name='amt' size=10></td></tr>
<tr><td colspan=2 align=center><input type=submit name='save' value='Save'></td></tr>
</table>
</td></tr>
</table>
</form>

