我正在尝试使用一个执行SQLite查询的按钮编辑我的SQLite表中的一行。但它没有改变任何东西
感谢任何帮助。
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>FORM</title>
<meta http-equiv="content-type" content="text/html; charset="utf-8">
<Link rel="stylesheet" href="ac.css" type="text/css" media="print"/>
<link rel="stylesheet" type="text/css" href="css/ma.css" />
</head>
<body>
<?php
date_default_timezone_set("America/New_York");
$handle = new SQLite3("./d/idb.db");
if(isset($_GET["index"])) {
$sel = $_GET["index"]+1;
} else {
Header('Location: la.php');
exit;
}
if (isset($_POST['submit'])) {
$handle->query("UPDATE tri SET c = 'NM' WHERE mj = 4");
}
?>
<form>
<input type="submit" value="submit" name="submit" id="button">
</table>
</form>
</body>
</html>