?>
</option> 
                          <?php 
    }
}
?>
                      </select>
                    </div>
                    
                    
                    <div class="form-group">
                      <label for="exampleInputEmail1">Size Name</label>
                      <select name="size_id" id="size_id">
                          <option value="">Select Clothing Type</option>    
                          <?php 
$clothing_sizes = getAllProductsSizes();
if ($clothing_sizes > 0) {
    while ($clothing_size = mysql_fetch_array($clothing_sizes)) {
        ?>
                          <option value="<?php 
        echo $clothing_size['size_id'];
        ?>
"><?php 
        echo $clothing_size['size_name'];
        ?>
</option> 
                          <?php 
    }
}
?>
                      </select>
<div>
  <table width="100%" border="0" class="tabel_size">
  <?php 
$product_sizes = getAllProductsSizes();
if ($product_sizes > 0) {
    while ($product_size = mysql_fetch_array($product_sizes)) {
        ?>
      <tr>
          <td><input name="product_size" type="checkbox" value="" onclick="return getProductBySize(<?php 
        echo $product_size['size_id'];
        ?>
)"><span><a href="javascript:;" onclick="return getProductBySize(<?php 
        echo $product_size['size_id'];
        ?>
)"><?php 
        echo $product_size['size_name'];
        ?>
 <?php 
        $last_thread = countProductByProductSize($product_size['size_id']);
        $lastthread = mysql_fetch_array($last_thread);
        echo "(" . $lastthread[0] . ")";
        ?>
 </a></span></td>
  </tr>
 <?php 
    }
}
?>
</table>

   
                  </div>
                </div><!-- /.box-header -->
                <div class="box-body">
                  <div class="table-responsive">
                    <table class="table no-margin">
                      <thead>
                        <tr>
                          <th>Size Id</th>
                          <th>Size name</th>
                          <th>Created At</th>
                          <th>Actions</th>
                        </tr>
                      </thead>
                      <tbody>
                          <?php 
$result = getAllProductsSizes();
if ($result > 0) {
    while ($topmenu = mysql_fetch_array($result)) {
        ?>
                          <tr>
                          <td><?php 
        echo $topmenu['size_id'];
        ?>
</td>
                          <td><?php 
        echo $topmenu['size_name'];
        ?>
</td>                         
                          <td><div class="sparkbar" data-color="#00a65a" data-height="20"><?php 
        echo date("j F, Y", strtotime($topmenu['createdAt']));
        ?>