下面是我的代码。我正在尝试将变量插入到名为咖啡的数据库中的表订单中。但是,当我提交页面时,变量不会出现在数据库中。
$name = $_POST['name'];
$address = $_POST['address'];
$city = $_POST['city'];
$state = $_POST['state'];
$zip = $_POST['zip'];
$qty = $_POST['qty'];
$qty_T = $_POST['qty2'];
$option = $_POST['coffee'];
$option_T = $_POST['coffee2'];
$query = "INSERT INTO orders(Name, Address, City, State, Zip, Quantity, Beans) VALUES ('$name', '$address', '$city', '$state', '$zip', '$qty', '$option')";
mysql_query($query);
mysql_close();
谢谢你的帮助