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





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

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



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



$total_price=$_POST[qty]*$_POST[unit_price];



mysql_query("insert into laundry(date1 ,category ,qty,unit_price,total_price,stype)VALUES ('$date1','$_POST[category]','$_POST[qty]','$_POST[unit_price]','$total_price','$_POST[stype]')");



header("location:$_POST[url]?info=New Product Created Successfully");

}else{

	header("location:$_POST[url]?product=$_POST[product]&qty=$_POST[qty]&category=$_POST[category]&info=Please Select Product");

	}





}else{

header("location:$_POST[url]?product=$_POST[product]&qty=$_POST[qty]&category=$_POST[category]&info=Please Insert Qty");

}

?>