购物车按钮不起作用

Hi I have some more issues in my coding.when i have to changed my coding structure from div to table add to cart button not working.when it is working when it is in div but i have change to table cart button not working please help me to resolve my issue..

Code below is the old one (div) thats working fine here..

 <?php if($microproduct['nr']){?>
               <div class="product-box">
                    <div class="list" id="micropro">
                            <?php foreach ($microproduct['result'] as $resultmicroproduct){ ?> 
                                <div class="row">
                                <div class="col-md-3">
                                  <img src="images/feature-two-one.png" class="img-fluid mx-auto d-block">
                                </div>
                              <div class="col-md-7">
                                  <div class="pro-desc">
                                    <h5><?php echo $conn->stripval($resultmicroproduct['microsoft_product_legalname']);?></h5>
                                    <p>Part number: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_partnumber']);?></p>
                                    <p>Item Name: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_name']);?></p>
                                    <p>Product family: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_family']);?></p>
                                    <h4><i class="fa fa-rupee"></i> <?php echo $conn->stripval($resultmicroproduct['microsoft_product_price']);?></h4>
                                  </div>
                                </div>
                                <div class="col-md-2">
                                  <div class="wrapper-div">
                                    <input min="1" type="number" name="quantity<?php echo $resultmicroproduct['microsoft_product_id'] ?>" class="form-control" id="quantity" value="1" autocomplete="off">
                                    <br>
                                    <?php $postvalue = base64_encode(json_encode($resultmicroproduct)); ?>
                                     <input type="hidden" name="type" value="microsoft_product">
                                    <button class="btn btn-dark btn-sm add_to_cart"  id="<?php echo $resultmicroproduct['microsoft_product_id'] ?>" >Add to Cart</button>
                                  </div>
                                </div> 
                            </div>
                            <?php } ?>
                    </div>
                </div>
                <?php } ?>

Code Below is the new one (table) cart button not working..

<table id="example" class="table table-striped table-bordered" style="width:100%">
                <thead>
                    <tr>
                        <th>Image</th>
                        <th>Product Description</th>
                        <th>Quantity & Cart</th>
                    </tr>
                </thead>
                <?php if($microproduct['nr']){?>
                <tbody>
                    <?php foreach ($microproduct['result'] as $resultmicroproduct){ ?>  
                    <tr class="product-box">  
                        <td><img src="images/feature-two-one.png" class="img-fluid mx-auto d-block"></td>
                        <td>
                          <div class="pro-desc">
                            <h5><?php echo $conn->stripval($resultmicroproduct['microsoft_product_legalname']);?></h5>
                            <p>Part number: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_partnumber']);?></p>
                            <p>Item Name: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_name']);?></p>
                            <p>Product family: <?php echo $conn->stripval($resultmicroproduct['microsoft_product_family']);?></p>
                            <h4><i class="fa fa-rupee"></i> <?php echo $conn->stripval($resultmicroproduct['microsoft_product_price']);?></h4>
                          </div>
                        </td>
                        <td>
                          <div class="wrapper-div">
                            <input min="1" type="number" name="quantity<?php echo $resultmicroproduct['microsoft_product_id'] ?>" class="form-control" id="quantity" value="1" autocomplete="off">
                            <br>
                             <input type="hidden" name="type" value="microsoft_product">
                            <button class="btn btn-dark btn-sm add_to_cart" id="<?php echo $resultmicroproduct['microsoft_product_id'] ?>">Add to Cart</button>
                          </div>
                        </td>
                    </tr>  
                    <?php } ?>
                </tbody>
                <?php } ?>
                <tfoot>
                    <th>Image</th>
                    <th>Product Description</th>
                    <th>Quantity & Cart</th>
                </tfoot>
        </table>

You don't even have a form.

<form action ="?" method="?">
  //your inputs and submit
</form>

What do you expect to happen if you don't define what to do?