
      <section class="new-arrival">
           <?php
            $per_page = 4;
            if (isset($_GET['page'])) {
              //echo "lets go";
              $page = $_GET['page'];
            }else {
              //echo "wait for a minute";
              $page = "";
            }if ($page=='' || $page==1) {
              $page1 = 0;
            }else {
              $page1 = ($page * $per_page) - $per_page;
            }



            $sql3 = "SELECT * FROM products  WHERE sub_category_id = 1";
            $res3 = mysqli_query($conn, $sql3);
            $count3= mysqli_num_rows($res3);
            $count3 = ceil($count3 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>Electronics</strong>
          <p>See new Electronics</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products WHERE sub_category_id = 1 LIMIT $page1, $per_page";
            $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"> -->

                <?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">
                   VIEW PRODUCT
                </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>
       <ul class="pager">
            <?php
            for ($i=1; $i <=$count3 ; $i++) {
              if ($i == $page) {
                  echo "<li><a class='active_link' href='women.php?page=$i'>$i</a></li>";
              }else {
                echo "<li><a href='women.php?page=$i'>$i</a></li>";
              }

            }

             ?>


      </section>
      
      <section class="new-arrival">
           <?php
            $per_page = 4;
            if (isset($_GET['page'])) {
              //echo "lets go";
              $page = $_GET['page'];
            }else {
              //echo "wait for a minute";
              $page = "";
            }if ($page=='' || $page==1) {
              $page1 = 0;
            }else {
              $page1 = ($page * $per_page) - $per_page;
            }



            $sql5 = "SELECT * FROM products  WHERE sub_category_id = 9";
            $res5 = mysqli_query($conn, $sql5);
            $count5= mysqli_num_rows($res5);
            $count5 = ceil($count5 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>Beddings</strong>
          <p>View New Design Beddings</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql4 = "SELECT * FROM products WHERE sub_category_id = 9 LIMIT $page1, $per_page";
            $res4 = mysqli_query($conn, $sql4);
            $count4= mysqli_num_rows($res4);
            if ($count4>0) {
              while ($row4 = mysqli_fetch_assoc($res4)) {
                // code...
                $id = $row4['id'];
                $title = $row4['title'];
                $image_name = $row4['image_name'];
                $description = $row4['description'];
                $featured = $row4['featured'];
                $active = $row4['active'];
                $size = $row4['size'];
                $price = $row4['price'];
                ?>
          <form action="item-description.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"> -->

                <?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">
                   VIEW PRODUCT
                </button>
              </div>
              <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>
          <ul class="pager">
            <?php
            for ($i=1; $i <=$count5 ; $i++) {
              if ($i == $page) {
                  echo "<li><a class='active_link' href='women.php?page=$i'>$i</a></li>";
              }else {
                echo "<li><a href='women.php?page=$i'>$i</a></li>";
              }

            }

             ?>

           </ul>


         
      </section>
