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



            $sql3 = "SELECT * FROM products  WHERE sub_category_id = 14";
            $res3 = mysqli_query($conn, $sql3);
            $count3= mysqli_num_rows($res3);
            $count3 = ceil($count3 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>T-Shirts</strong>
          <p>See Our Men T-shirts</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products WHERE sub_category_id = 14  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 == $page2) {
                  echo "<li><a class='active_link' href='men.php?page2=$i'>$i</a></li>";
              }else {
                echo "<li><a href='men.php?page2=$i'>$i</a></li>";
              }

            }

             ?>


          </ul>
      </section>

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



            $sql4 = "SELECT * FROM products  WHERE sub_category_id = 5";
            $res4 = mysqli_query($conn, $sql4);
            $count4= mysqli_num_rows($res4);
            $count4 = ceil($count4 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>HOODIES</strong>
          <p>See Our Men Hoodies</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products WHERE sub_category_id = 5 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'];
                ?>
          <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 <=$count4 ; $i++) {
              if ($i == $page3) {
                  echo "<li><a class='active_link' href='men.php?page3=$i'>$i</a></li>";
              }else {
                echo "<li><a href='men.php?page3=$i'>$i</a></li>";
              }

            }

             ?>


          </ul>
      </section>

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



            $sql5 = "SELECT * FROM products  WHERE sub_category_id = 12";
            $res5 = mysqli_query($conn, $sql5);
            $count5= mysqli_num_rows($res5);
            $count5 = ceil($count5 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>Men Trousers</strong>
          <p>See Our Men Trousers</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products WHERE sub_category_id = 12 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'];
                ?>
          <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 == $page4) {
                  echo "<li><a class='active_link' href='men.php?page4=$i'>$i</a></li>";
              }else {
                echo "<li><a href='men.php?page4=$i'>$i</a></li>";
              }

            }

             ?>


          </ul>
      </section>

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



            $sql6 = "SELECT * FROM products  WHERE sub_category_id = 8";
            $res6 = mysqli_query($conn, $sql6);
            $count6= mysqli_num_rows($res6);
            $count6 = ceil($count6 / $per_page);
            //echo $count3;
             ?>
        <!-- heading -->
        <div class="arrival-heading">
          <strong>Men Shoes</strong>
          <p>See Our Men Shoes</p>
        </div>
        <div class="product-container">
          <!-- pproduct box-->
          <?php
            $sql = "SELECT * FROM products WHERE sub_category_id = 8";
            $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'];
                ?>
          <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 <=$count6 ; $i++) {
              if ($i == $page5) {
                  echo "<li><a class='active_link' href='men.php?page5=$i'>$i</a></li>";
              }else {
                echo "<li><a href='men.php?page5=$i'>$i</a></li>";
              }

            }

             ?>


          </ul>
      </section>

