<?php
$id = $_GET['id'];
$db = new mysqli("localhost","root","root","db_0808");
$sql = "select * from cargo WHERE id = {$id}";
$result=$db->query($sql);
$data = $result->fetch_assoc();
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title></title>
</head>
<body>
<table class="table table-hover" border="1">
<tr>
<th></th>
<th>产品大类</th>
<th>产品名称</th>
<th>产品编号</th>
<th>出货日期</th>
<th>出货数量</th>
<th>入库日期</th>
<th>入库数量</th>
<th>库存</th>
<th>负责人</th>
</tr>
<form action="chpost.php" method="post">
<tr>
<td><input type="hidden" name="id" value=" <?php echo $data['id']?>" style="width: 100px"></td>
<td><input type="text" name="lname" value=" <?php echo $data['name']?>" style="width: 100px"></td>
<td><input type="text" name="name" value=" <?php echo $data['lname']?>" style="width: 100px"></td>
<td><input type="text" name="number" value=" <?php echo $data['number']?>" style="width: 100px"></td>
<td><input type="text" name="dod" value=" <?php echo $data['dod']?>" style="width: 100px"></td>
<td><input type="text" name="spq" value=" <?php echo $data['spq']?>" style="width: 100px"></td>
<td><input type="text" name="wet" value=" <?php echo $data['wet']?>" style="width: 100px"></td>
<td><input type="text" name="pic" value=" <?php echo $data['pic']?>" style="width: 100px"></td>
<td><input type="text" name="kucun" value=" <?php echo $data['kucun']?>" style="width: 100px"></td>
<td><input type="text" name="fname" value=" <?php echo $data['fname']?>" style="width: 100px"></td>
</tr>
<input type="submit" value="提交">
</form>
</table>
</body>
</html>
转载于:https://www.cnblogs.com/ping04/p/7837335.html