我无法弄明白,谢谢你的阅读 我多次编辑代码但总是以相同的结果结束
这是代码(html):
<input type="number" size="2" title="Input value" placeholder="0" id="doni"
name="Value" required maxlength="4"onKeyDown="limitText(this,4);" />
<input type="submit" value="+" name="button" title="Add" onclick =action
="addQuan.php"/>
<?php
include('connect.php');
$id = $_POST['memi'];
$a = $_POST['code'];
$b = $_POST['bname'];
$c = $_POST['Value'];
$d = $_POST['price'];
$e = $_POST['supplier'];
$f = $_POST['qty_left'];
$i = $_POST['dname'];
$t = $f + $c;
$sql = "UPDATE products
SET qty_left=?
WHERE product_id=?";
$q = $db->prepare($sql);
$q->execute(array($t,$id));
header("location: products.php");?>