<?php include 'header.php';?>



  <div class="content-page">

    <div class="content">

      <div class="container">

	  

	  <div class="row">

          <div class="col-sm-12">

            <div class="page-header-title">

			<button type="button" class="btn btn-dark waves-effect waves-light" onclick="location.href='edit_vendor.php?vendor_id=<?php echo $_REQUEST['vendor_id'];?>'">BACK </button>

              <div class="clearfix"></div>

            </div>

          </div>

        </div>

	  

		

		

		<div class="row">

          <div class="col-md-12">

            <div class="panel panel-primary">

              <div class="panel-heading">

                <h3 class="panel-title">Edit Product</h3>

              </div>

              <div class="panel-body">

                <div class="row">

                  <div class="col-sm-12 col-xs-12">

                      <div class="m-t-20">

					  <table class="table table-striped table-bordered dt-responsive nowrap">

 <form name="chkForm" id="chkForm" action="update_vendor_product.php"  method="post" >
<input type="hidden" name="vendor_id" value="<?php echo $_REQUEST['vendor_id']?>"/>
<input type="hidden" name="product_id" value="<?php echo $_REQUEST['product_id']?>"/>


 <?php
$querybill = "select * from  vendor_product_master where vendor_id = '".$_REQUEST['vendor_id']."'";
$resultbill = mysqli_query($conn,$querybill);	
while($row=mysqli_fetch_array($resultbill))
{
$product_name = $row['product_name'];
$product_details = $row['product_details'];
$unit = $row['unit'];
$price = $row['price'];
}
?>



<tr style="color:#000000">

    <td><strong>Product Name</strong></td>

    <td><input type="text" class="form-control"  name="product_name" value="<?php echo $product_name?>"/></td>

  </tr>

 
   <tr style="color:#000000">

    <td><strong>Product Specification</strong></td>

    <td><textarea class="form-control" rows="5" name="product_details"><?php echo $product_details?></textarea></td>

  </tr> 

  <tr style="color:#000000">

    <td><strong>Unit</strong></td>

    <td>
	
	<select name="unit"  class="form-control" required>
							 <?php if($unit!=''){?> 
							 <option value="<?php echo $unit?>"><?php echo $unit?></option><?php }else{?>
							 <option value="">Select Unit</option>
							 <?php } ?>
                                                     <?php $query21 = "select * from unit_master";
       $result21 = mysqli_query($conn,$query21);
        while($row=mysqli_fetch_array($result21))
           {
$unit = $row['unit'];?>
                                                <option value="<?php echo $unit?>"><?php echo $unit?></option>
												<?php } ?>
                                                   </select>
	
	</td>

  </tr>

  <tr style="color:#000000">

    <td><strong>Price</strong></td>

    <td><input type="text" class="form-control" name="price" value="<?php echo $price?>"/></td>

  </tr> 

 <tr style="color:#000000">

    <td colspan="2"><div align="center"> <button type="submit" class="btn btn-primary waves-effect waves-light"> EDIT </button></td>

    </tr></form> 

</table>
                    </div>

                  </div>

                </div>

              </div>

            </div>

          </div>

        </div>

		

		

		

		

		

		

		

        

      </div>

    </div>

	<?php include 'footer.php';?>