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.
 
 
 
 
 
 

75 lines
2.1 KiB

<?php
include "header.php";
$id = isset($_GET['id']) ? $_GET['id'] : die('ERROR: Record ID not found.');
$data = array();
// sql語法存在變數中
$db_query = "SELECT * FROM delivery_log WHERE id=$id";
// 用mysqli_query方法執行(sql語法)將結果存在變數中
$data = mysqli_query($link,$db_query);
/*
include "inc/record_update.php";
try {
// 設置一個空陣列來放資料
$data = array();
// sql語法存在變數中
$db_query = "SELECT * FROM expert WHERE id=$id";
// 用mysqli_query方法執行(sql語法)將結果存在變數中
$data = mysqli_query($link,$db_query);
}catch (Exception $e) {
echo 'Caught exception: ', $e->getMessage(), "\n";
}
*/
foreach($data as $data) :
?>
<div class="container">
<form class="form-inline" method="post" action="delivery_log-record-update.php" enctype="multipart/form-data">
<input type="hidden" name="id" value="<?php echo $id; ?>">
<div>
<label for="delivery_no">貨運單號</label>
<input type="text" name="delivery_no" id="delivery_no" value="<?php echo $data['deliver_no']; ?>">
</div>
<div>
<label for="issue_time">實際抵達時間</label>
<input type="text" name="issue_time" id="issue_time" value="<?php echo $data['issue_time']; ?>">
</div>
<div>
<label for="location">地點</label>
<input type="text" name="location" id="location" value="<?php echo $data['location']; ?>">
</div>
<div>
<label for="memo">備註</label>
<input type="text" name="memo" id="memo" value="<?php echo $data['memo']; ?>">
</div>
<div>
<label for="creater">建檔人</label>
<input type="text" name="creater" id="creater" value="<?php echo $data['creater']; ?>" readonly>
</div>
<div>
<br>
<button type="submit" name="update">確定</button>
</div>
<input type="hidden" name="token" value="<?php echo $token; ?>">
</form>
</div>
<?php
endforeach;
include "footer.php";
?>