1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
<?php include_once('../../check_login.php');
$refid = (int)$_GET["refid"];
$sql = "update upload_file set deleted = ? WHERE refid=?"; $parameters = array("1", $refid);
if (!($sth = $dbh->prepare($sql))) { throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo())); }
if (!$sth->execute($parameters)) { throw new Exception('[' . $sth->errorCode() . ']: ' . print_r($sth->errorInfo())); }
$dbh = null;
header("Location: upload_file_index.php?for_table=" . $_GET["for_table"] . "&for_refid=" . (int)$_GET["for_refid"] . "&msg=刪除成功");
?>
|