You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

42 lines
1.3 KiB

<?php
$accountid= "";
$facilityno= "";
$issue_time= "";
$process= "";
$memo= "";
$creater= "";
$create_at= "";
$accountid_error= "";
$facilityno_error= "";
$issue_time_error= "";
$process_error= "";
$memo_error= "";
$creater_error= "";
$create_at_error= "";
if($_SERVER["REQUEST_METHOD"] == "POST"){
include "wipinstallation-user-input.php";
$db_query = "INSERT INTO wipinstallation(accountid, facilityno, issue_time, process,creater,create_at) VALUES ('$accountid', '$facilityno', '$issue_time', '$process', '$creater', '$create_at')";
$result = mysqli_query($link,$db_query);
$affected = mysqli_affected_rows($link);
mysqli_close($link);
if ($affected > 0) {
echo "<script type ='text/JavaScript'>";
echo "alert('新增成功');";
echo "location.href='wipinstallation-index.php?function_name=wipinstallation&".$token_link."';";
echo "</script>";
} elseif ($affected == 0) {
echo "<script type ='text/JavaScript'>";
echo "alert('無新增資料');";
echo "location.href='wipinstallation-index.php?function_name=wipinstallation&".$token_link."';";
echo "</script>";
} else {
echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link);
}
}
?>