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.
 
 
 
 
 
 

62 lines
1.6 KiB

<?php
require_once "database.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 "purchase-user-input.php";
echo "<script type ='text/JavaScript'>";
echo "alert('新增成功');";
echo "location.href='purchase-create.php';";
echo "</script>";
/*
$db_query = "INSERT INTO wipproduction(accountid, facilityno, issue_time, process, creater,create_at) VALUES ('$accountid', '$facilityno', '$issue_time', '$process', '$creater', '$create_at')";
$result = mysqli_query($link,$db_query);
if (mysqli_affected_rows($link)>0) {
// 如果有一筆以上代表有更新
// mysqli_insert_id可以抓到第一筆的id
$new_id= mysqli_insert_id ($link);
echo "<script type ='text/JavaScript'>";
echo "alert('新增成功');";
echo "location.href='wipproduction-index.php';";
echo "</script>";
}
elseif(mysqli_affected_rows($link)==0) {
echo "<script type ='text/JavaScript'>";
echo "alert('無新增資料');";
echo "location.href='wipproduction-index.php';";
echo "</script>";
}
else {
echo "{$db_query} 語法執行失敗,錯誤訊息SSS: " . mysqli_error($link);
}
*/
mysqli_close($link);
//header("location: wipproduction-index.php");
}
?>