<!-- sale -->
<section class="sale">
  
    <div class="arrival-heading">
          <strong>Sale Offers</strong>
          <p>Glab Our Monthly Offers🙏🏿🙏🏿</p>
      </div>


      <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products LIMIT 4";
            $res = mysqli_query($conn, $sql);
            $count= mysqli_num_rows($res);
            if ($count>0) {
              while ($row = mysqli_fetch_assoc($res)) {
                // code...
                $id = $row['id'];
                $title = $row['title'];
                $image_name = $row['image_name'];
                $description = $row['description'];
                $featured = $row['featured'];
                $active = $row['active'];
                $size = $row['size'];
                $price = $row['price'];
                $qty = $row['qty'];
                ?>
          <form action="item-description1.php" method="post" enctype="multipart/form-data">
            <div class="product-box">

              <div class="product-img">
                  <!-- cart-->
                  <!-- cart -->
               
                <!-- <input type="submit" name="submit" value="cart" class="add-cart"> -->
                <button type="submit" name="submit" class="add-offer">
                 <p> -50%</p>
                </button>
                <?php
                if ($image_name) {
                  //img is available
                  ?>
                  <img src="<?php echo SITEURL; ?>images/products/<?php echo $image_name; ?>" width="100px" >
                  <?php
                }else {
                  //img is not available
                  echo  "<div class='error'>Img is not Added</div>";
                }

                 ?>
              </div>
              <div class="product-details">
                <a href="javascript:void(0);" class="p-name"><?php echo $title?></a>
                <span class="p-price">$<?php echo $price?></span>
                <button type="submit" name="submit" class="add-cart">
                   GLAB ME😍🚚
                </button>
              </div>
               <input type="hidden" name="qty" value="<?php echo $qty?>">
              <input type="hidden" name="id" value="<?php echo $id?>">
              <input type="hidden" name="title" value="<?php echo $title?>">
              <input type="hidden" name="image_name" value="<?php echo $image_name?>">
              <input type="hidden" name="price" value="<?php echo $price?>">
              <input type="hidden" name="size" value="<?php echo $size?>">
              <input type="hidden" name="description" value="<?php echo $description?>">
              <input type="hidden" name="active" value="<?php echo $active?>">
              <input type="hidden" name="featured" value="<?php echo $featured?>">

            </div>
            <!-- pproduct box -->
          </form>

          <?php
        }
      }else {
        echo 'No clothes Added';
      }
      ?>

        </div>





  <!-- sale-box
    <div class="feature-cart">
       <div class="feature-item">
      <div class="feature-box">
        <button type="submit" name="submit" class="add-offer">
                 <p> -50%</p>
                </button>
        <a href="#"><img src="images/feature_1.jpg"/></a>
      </div>
      <span>Men Tshirt</span>
       
       <button type="submit" name="submit" class="add-cart">
                   GLAB ME😍🚚
            </button>
    </div>
    </div> -->
       
   

</section>
