if (isset($_POST)){
if ($_POST['isAdd'] == 'true') {
$Officer = $_POST['Officer'];
$Desk = $_POST['Desk'];
$Food = $_POST['Food'];
$Amount = $_POST['Amount'];
$sql = "INSERT INTO orderTABLE (`id` , `Officer` ,`Desk`, `Food`,`Amount`) VALUES (NULL, 'Officer', 'Desk', 'Food','Amount')");
mysqli_query($con,$sql);
}
}
答案 0 :(得分:2)
在)
查询
INSERT
$sql = "INSERT INTO orderTABLE (`id` , `Officer` ,`Desk`, `Food`,`Amount`) VALUES (NULL, 'Officer', 'Desk', 'Food','Amount')");
应该是
$sql = "INSERT INTO orderTABLE (`id` , `Officer` ,`Desk`, `Food`,`Amount`) VALUES (NULL, 'Officer', 'Desk', 'Food','Amount')";