conn.php

mysqli_query($conn,"set names utf8"); //设置数据库编码格式utf8

?>

gl.html

管理员界面

添加商品

删除商品

更改商品

更改订单状态



gadd.html

添加商品界面


书名
价格
数量



gadd.php
* Created by PhpStorm.
* User: 田庆辉
* Date: 2020/5/29
* Time: 11:00*/
$name=$_POST['name'];$prince=$_POST['prince'];$number=$_POST['number'];include_once("conn.php");$sql = "insert into book(name,prince,number) values ('$name','$prince','$number')";//echo 'sql语句为',$sql;
$result = mysqli_query($conn,$sql);//echo $result;
if ($result){echo "添加成功,点击这里回到主菜单";
}else{echo "";
}
del.php

删除商品界面


fieldset{width:850px; margin: 0auto;}
legend{font-weight:bold; font-size:14px;}
label{float:left; width:70px; margin-left:10px;}.left{margin-left:80px;}.input{width:150px;}.sousu{margin-left:210px; width:300px}.sousubutton{margin-left:20px;}
商品删除
while($row = mysqli_fetch_row($rs)){echo "
$row[0]$row[1]$row[2] 
 删除"; 
 
}?>
del2.php

删除界面