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.
44 lines
1.6 KiB
44 lines
1.6 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 "wipproduction-user-input.php";
|
|
|
|
$db_query = "INSERT INTO wipproduction(accountid, facilityno, region, issue_time, process, creater,create_at) VALUES ('$accountid', '$facilityno', '$region', '$issue_time', '$process', '$creater', '$create_at')";
|
|
$result = mysqli_query($link,$db_query);
|
|
$db_query = "INSERT INTO wipinstallation(accountid, facilityno, region, issue_time, process, creater,create_at) VALUES ('$accountid', '$facilityno', '$region', '$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='wipproduction-index.php?function_name=wipproduction&".$token_link."';";
|
|
echo "</script>";
|
|
} elseif ($affected == 0) {
|
|
echo "<script type ='text/JavaScript'>";
|
|
echo "alert('無新增資料');";
|
|
echo "location.href='wipproduction-index.php?function_name=wipproduction&".$token_link."';";
|
|
echo "</script>";
|
|
} else {
|
|
echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link);
|
|
}
|
|
}
|
|
?>
|
|
|