我有数据库表作为os_dish 在那道菜类型= 1是tiffen // dishtype = 2是午餐//
我的错误只是Tiffen和午餐中的tiffen价值
我想选择多个我怎么做才能这是我的Tiffen代码:
<div class="products-row">
<?php $tq=$conn->query("select * from os_dish where dish_type=1");
while ($tiffen = $tq->fetch_assoc()) {
?>
<div class="col-md-3">
<div class="foodmenuform row text-center">
<input type="checkbox" id="<?php echo $tiffen['dish_name'];?>" class="Foodmenu" value="<?php echo $tiffen['dish_name'];?>" name="tifeen[]" hidden>
<label for="<?php echo $tiffen['dish_name'];?>"><img src="img/dish/<?php echo $tiffen['dish_image']; ?>" class="img img-responsive" /></label>
</div>
</div>
<?php } ?>
</div>
这是我的Luch代码:
<div class="products-row">
<?php $lq=$conn->query("select * from os_dish where dish_type=2");
while ($lunch = $lq->fetch_assoc()) {
?>
<div class="col-md-3">
<div class="foodmenuform row text-center">
<input type="checkbox" id="<?php echo $lunch['dish_name'];?>" class="FoodMenu" value="<?php echo $lunch['dish_name'];?>" name="lunch[]" hidden>
<label for="<?php echo $lunch['dish_name'];?>"><img src="img/dish/<?php echo $lunch['dish_image']; ?>" class="img img-responsive" /></label>
</div>
</div>
<?php } ?>
</div>