$v) { $$k = htmlspecialchars(stripslashes(trim($v))); } $facilityno=$_POST['facilityno']; $maintance_contract_id=$_POST['maintance_contract_id']; $brand=$_POST['brand']; $type=$_POST['type']; $speed=$_POST['speed']; $weight=$_POST['weight']; $usednature=$_POST['usednature']; $usedage=$_POST['usedage']; $numberoffloor=$_POST['numberoffloor']; $numberofstop=$_POST['numberofstop']; $numberofdoor=$_POST['numberofdoor']; $tai_count=$_POST['tai_count']; $yearlyinspectiondate=$_POST['yearlyinspectiondate'];//年檢日期 $standardprice=$_POST['standardprice'];//標準價 $discusspricing=$_POST['discusspricing'];//議定價 $calibrationfee=$_POST['calibrationfee'];//校驗費 $yearlyinspectionfee=$_POST['yearlyinspectionfee']; //年檢費 $sumfee= $_POST['sumfee'];//小計 $creater = $_POST['creater']; $create_at = date('Y/m/d H:i:s'); $updatee_at=date('Y/m/d H:i:s'); $id= $_POST['id']; $db_query = "update maintance_contract_detail set maintance_contract_id = '$maintance_contract_id', facilityno = '$facilityno',"; $db_query .= "brand = '$brand', type = '$type', speed = '$speed', type = '$type',weight = '$weight',usednature = '$usednature',"; $db_query .= "usedage = '$usedage', numberoffloor = '$numberoffloor', numberofstop = '$numberofstop',numberofdoor = '$numberofdoor',"; $db_query .= "tai_count = '$tai_count', yearlyinspectiondate = '$yearlyinspectiondate', standardprice = '$standardprice',"; $db_query .= "discusspricing = '$discusspricing', calibrationfee = '$calibrationfee', yearlyinspectionfee = '$yearlyinspectionfee',"; $db_query .= "sumfee = '$sumfee', creater = '$creater',"; $db_query .= "updatee_at = NOW() "; $db_query .= "where id = '$id'"; if ($rs = mysqli_query($link, $db_query)) { header("Location: faultreview-index.php"); if (mysqli_affected_rows($link) > 0) { echo ""; } else { echo ""; } } mysqli_close($link); } ?>