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



$result = mysql_query("select prodcode,bcode from purreg where record = '$record' ") or die(mysql_error());
$row = mysql_fetch_row($result);
$bcode = $row[0];
$prodcode =$row[1];

if ( isset($submit) && $submit == "Update")
{
   $result=mysql_query("update purreg set date='$date', receipt ='$receipt',issue='$issue',balance='$balance' where record='$record'") or   die(mysql_error());
}
elseif (isset($submit) && $submit == "Delete")

{
$result=mysql_query("delete from purreg where record='$record'") or
die(mysql_error());
}
recalc($bcode,$prodcode);
?>
<table>
<tr><td colspan=4 align=middle>
<h4><a href="view_sele.php">View Purchase Details  </a>

<br><br><font size=1><center><a href= "index.html">Return to index page</center></font></table>
