<?php 
include("../../../include/dbconnect.php");
?>
<title> Material details edit</title>
<body background="blater01.gif" topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font ><b>Material details edit</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font >&nbsp;</font>
</td>
</tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590">
<form name="form1" method="POST"  action="update.php?<?echo($record);?>">

<? 	

$result=mysql_query("select prodcode,prodname,tariff,cust_prodcode,matcatcode,mattype,matsize,sizeunit,matwidth,widthunit,matthick,thickunit,grade,finish,division,COMPOSE,minimum_qty from rawmaterial where record = '$record' ");
$row1=mysql_fetch_row($result);
?>


<tr><td><font class="sbd"><b>Material Code </b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   maxlength=14 size="15" name="prodcode" value = <?php echo($row1[0]);?>></td></tr>

<tr><td><font class="sbd"><b>Material Name</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="prodname" value = <?php echo("'$row1[1]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Minimum Qty</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="minimum_qty" value = <?php echo("'$row1[16]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Excise tariff</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="tariff" value = <?php echo("'$row1[2]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Suppliers Material Code</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="cust_prodcode" value = <?php echo("'$row1[3]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Group Code</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="matcatcode" value = <?php echo("'$row1[4]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Type</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="mattype" value = <?php echo("'$row1[5]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Size</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="matsize" value = <?php echo("'$row1[6]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Size Unit</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="sizeunit" value = <?php echo("'$row1[7]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Width</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="matwidth" value = <?php echo("'$row1[8]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Width Unit</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="widthunit" value = <?php echo("'$row1[9]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Thickness</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="matthick" value = <?php echo("'$row1[10]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Thickness Unit</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="thickunit" value = <?php echo("'$row1[11]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Grade</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="grade" value = <?php echo("'$row1[12]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Division</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="division" value = <?php echo("'$row1[14]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Finish</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   size="40" name="finish" value = <?php echo("'$row1[13]'");?>>  </td></tr>

<tr><td><font class="sbd"><b>Material Composition</b></font></td>
<td  width=260 align="left"><textarea cols="30" rows="8" name="compose"><?php echo($row1[15]);?></textarea></td></tr>>  

<input type="hidden" name="record" value="<?echo $record;?>">

<table cellpading=0 cellspacing=10 width= 50>
<tr>
<td>
 <blockquote>  <input type =submit name=submit value = "Update"></td> <td><input type ="submit" name="submit" value = "Delete"></blockquote>
</table>

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