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

<body background="blater01.gif" topmargin=0>
<?

if ( isset($submit) && $submit == "Update")
{
     $query ="update rawmaterial set prodcode='$prodcode',prodname='$prodname',tariff='$tariff',cust_prodcode='$cust_prodcode',matcatcode ='$matcatcode',mattype='$mattype',finish='$finish',matsize='$matsize',sizeunit='$sizeunit',matwidth='$matwidth',widthunit='$widthunit',matthick='$matthick',thickunit='$thickunit',division='$division',grade='$grade',compose='$compose',minimum_qty='$minimum_qty' where record ='$record' ";

 mysql_query($query) or die(mysql_error());

}
elseif (isset($submit) && $submit == "Delete")
{

  $query = mysql_query("delete from rawmaterial where record='$record' ") or die(mysql_error());

}

?>
<center>
<h2><b>The Material details are updated </b></h2>
<br>
<br>

<h4><a href="view.php">View Materials</a></h4></center>


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