我在链接上有完整的 html 和 php 代码,你们能帮我找出哪里出错并帮我解决吗?提前致谢。主要问题是我无法将选中/选中的单选按钮值插入数据库。
$itm_chairs = $_POST['itm_chairs'];
$itm_tables = $_POST['itm_tables'];
$itm_speakers = $_POST['itm_speakers'];
$itm_utensils = $_POST['itm_utensils'];
$itm_videoke = $_POST['itm_videoke'];
$itm_car = $_POST['itm_car'];
$ven_pool = $_POST['ven_pool'];
$ven_house = $_POST['ven_house'];
if(empty($itm_chairs)) {
} else if(empty($itm_tables)) {
} else if(empty($itm_speakers)) {
} else if(empty($itm_utensils)) {
} else if(empty($itm_videoke)) {
}
else{
$query = "INSERT INTO tbl_rentals(
res_no,itm_chairs,itm_tables,itm_speakers,itm_utensils,itm_videoke,itm_car,ven_pool,ven_house
) VALUES ('{$res_no}','{$itm_chairs}','{$itm_tables}','{$itm_speakers}','{$itm_utensils}','{$itm_videoke}','{$itm_car}','{$ven_pool}','{$ven_house}')";
$result_set = mysql_query($query);