<?php 
include("../../include/dbconnect.php");
?>
<title> Product details edit</title>
<body bgcolor="#ffffff"  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font ><b>Product 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=mysqli_query($conn,"select * from prodcat where record = '$record' ");
$row1=mysqli_fetch_row($result);
?>

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


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

<tr><td><font class="sbd"><b>Rawmaterial / Finished Goods (R/F)</b></font></td><td>
<input type="text" onKeyPress="return event.keyCode!=13" maxlength=8 size="8" name="rf" value = <?php echo($row1[2]);?>></td></tr>

<tr><td><font class="sbd"><b>Discount (Yes/No)</b></font></td><td>
<input type="text" onKeyPress="return event.keyCode!=13" maxlength=8 size="8" name="discount" value = <?php echo($row1[3]);?>></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>
