<?php 
include("../../include/dbconnect.php");
?>
<title> Product details edit</title>
<body background="../../images/blater01.gif" topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=744>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font face="Arial, Helvetica, sans-serif" ><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="744"><td width="205"><form name="form1" method="POST"  action="update.php?<?echo($record);?>">
  <? 	

$result=mysqli_query($conn,"select prodname,catcode,packing,schedule,weight,minimum_qty,active,rate,acctmast_record,stprodcode,tax_rate from product where record = '$record' ") or die(mysqli_error());
$row1=mysqli_fetch_row($result);
?>
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Product Name</b></font></td>
    <td width="515"> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="prodname" value = <?php echo("'$row1[0]'");?>>
      </font></td>
  </tr>
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Group Code</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="catcode" value = <?php echo("'$row1[1]'");?>>
      </font></td>
  </tr>
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Packing</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="packing" value = <?php echo("'$row1[2]'");?>>
      </font></td>
  </tr>
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>HSN Code </b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="schedule" value = <?php echo("'$row1[3]'");?>>
      </font></td>
  </tr>
  
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b> Weight</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="weight" value = <?php echo("'$row1[4]'");?>>
      </font></td>
  </tr>
    
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Minimum Qty to 
      be maintained</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="minimum_qty" value = <?php echo("'$row1[5]'");?>>
      </font></td>
  </tr>
  
    <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Tax Rate</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="tax_rate" value = <?php echo("'$row1[10]'");?>>
      </font></td>
  </tr>
  
  
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Stock to be maintained under</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="stprodcode" value = <?php echo("'$row1[9]'");?>>
      </font></td>
  </tr>  
  <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Active Product</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="active" value = <?php echo("'$row1[6]'");?>>
      ' No' if not active</font></td>
  </tr>
  
    <tr>
    <td><font face="Arial, Helvetica, sans-serif" class="sbd"><b>Rate</b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <input type="text" onKeyPress="return event.keyCode!=13" size="40" name="rate" value = <?php echo("'$row1[7]'");?>>
      </font></td>
  </tr>
  <input type="hidden" name="record" value="<?=$record?>">
  <input type="hidden" name="acctmast_record" value="<?=$row1[8]?>">
  <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>
  <font face="Arial, Helvetica, sans-serif"><a href= "index.html">Return to index 
  page</font>
</center>
</font> 
                                                                             
</body>
</form>
