<?
require("config.inc");
$productID = $_GET['ProID'];
$productType = $_POST['Ptype'];
$productName = $_POST['Pname'];
$productDesc = $_POST['Pdesc'];
$productPrice = $_POST['Pprice'];
//echo "<script>alert('".$productType."');</script>";
$result = mysql_query("update tbl_product SET product_TYPE='$productType',product_NAME='$productName',product_desc='$productDesc',product_PRICE='$productPrice' where product_ID='$productID'");
//$row = mysql_fetch_array($result);
if($result-->0){
echo "<script>alert('Update Success');</script>";
echo "<script>window.location='editS.php?ProID=".$productID."';</script>";
}
else{echo "<script>alert('Failed to update');</script>";}
?>