Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/245.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 当我点击任何其他按钮,如desi food,我的订单按钮被触发_Php_Html_Button - Fatal编程技术网

Php 当我点击任何其他按钮,如desi food,我的订单按钮被触发

Php 当我点击任何其他按钮,如desi food,我的订单按钮被触发,php,html,button,Php,Html,Button,当我点击任何其他按钮,如desi food快餐或饮料时,我的订单按钮会自动点击 我不知道这两个按钮有没有重叠,或者有什么问题我是个傻瓜 <form method="post" action="orders.php" > <div class="container"> <div class="container col-sm-8"> <h3 style="color:Purple; text-align: c

当我点击任何其他按钮,如desi food快餐或饮料时,我的订单按钮会自动点击

我不知道这两个按钮有没有重叠,或者有什么问题我是个傻瓜

 <form method="post" action="orders.php" >
      <div class="container">




      <div class="container col-sm-8">

      <h3 style="color:Purple; text-align: center; background:#A1F3B2; " > Menu: </h3> 
      <div class="container">



        <div class="list-group">

            <a href="#" class="list-group-item list-group-item-action"><button class="btn" data-toggle="collapse" data-target="#desi">Desi Food</button></a>
            <div id="desi" class="collapse" style="background-color: white;" >
              <input type="checkbox" value="haleem" name=check_list[] /> Haleem <br>
              <input type="checkbox" value="chicken karahi" name=check_list[] /> Chicken Karahi <br>
              <input type="checkbox"  value="chanay paye" name=check_list[] /> Chanay Paye <br>
              <input type="checkbox" value="sabzi" name=check_list[] /> Sabzi <br>
            </div>
            <a href="#" class="list-group-item list-group-item-action"><button class="btn" data-toggle="collapse" data-target="#fast">FAST FOOD:</button></a>
             <div id="fast" class="collapse" style="background-color: white;">
              <input type="checkbox"  value="pizza"  name=check_list[] /> Pizza<br>
              <input type="checkbox"  value="burger"name=check_list[] /> Burger<br>
              <input type="checkbox"  value="pizza cone"name=check_list[] /> Pizza Cone <br>
              <input type="checkbox"  value="Shawarma" name=check_list[]/> Shawarma <br>
            </div>
            <a href="#" class="list-group-item list-group-item-action"><button class="btn" data-toggle="collapse" data-target="#drink">DRINKS</button></a>
             <div id="drink" class="collapse" style="background-color: white;" >
              <input type="checkbox" value="coca cola"  name=check_list[]/> Coca Cola<br>
              <input type="checkbox"  value="Red Bull" name=check_list[]/> Red Bull <br>
              <input type="checkbox" value="Orange juice" name=check_list[] /> Orange Juice <br>
              <input type="checkbox"  value="Lemon Juice" name=check_list[]/> Lemon Juice <br>
            </div>
        </div>
        <br>

     <button type="submit"   class="btn-success" style=" display: flex; margin:0 auto; align-items:center;">Order</button>

    </div>

  </form>
由于HTML5中的按钮具有默认行为,如submit-by,因此您应该在其他按钮上使用type=button

像这样:

饮料 由于HTML5中的按钮具有默认行为,如submit-by,因此您应该在其他按钮上使用type=button

像这样:

饮料