<?php include("config.php");





if($_POST[qty2]!=""){

if($_POST[category2]!=""){



$date1=dtformat($_POST[date2]);



$total_price=$_POST[qty2]*$_POST[unit_price2];



mysql_query("update inventory set date1='$date1' ,category='$_POST[category2]' ,qty='$_POST[qty2]',unit_price='$_POST[unit_price2]',total_price='$total_price' where id='$_POST[id]' limit 1");



header("location:inventory_stock_in.php?info=Product Updated Successfully");

}else{

	header("location:inventory_stock_in.php?qty=$_POST[qty2]&category=$_POST[category2]&info=Please Select category");

	}





}else{

header("location:inventory_stock_in.php?category=$_POST[category2]&info=Please Insert Qty");

}

?>