<?
require("config.inc");
$ownerID = $_GET['ownerID'];
$ownerName = $_POST['ON'];
$address = $_POST['OA'];
$hp = $_POST['OH'];
$email = $_POST['OE'];
$sex = $_POST['OS'];
$birth = $_POST['OB'];
//echo "<script>alert('".$productType."');</script>";
$result = mysql_query("update tbl_owner SET owner_Name='$ownerName',address='$address',handPhone='$hp',email='$email',sex='$sex',birthday='$birth' where owner_ID='$ownerID'");
//$row = mysql_fetch_array($result);
if($result-->0){
echo "<script>alert('Update Success');</script>";
echo "<script>window.location='editOwner.php?ownerID=".$ownerID."';</script>";
}
else{echo "<script>alert('Failed to update');</script>";}
?>