<?php   
ob_start(); //এটা এবং এর ইনড-ফ্লাস না দিলে; যদি নেট গতি কম হয় তাহলে ডাটাবেজ পাবে না।
include("configa.php");

// Start capturing the output of the category display

if( isset($_GET['catagory']) ){

  $catagory = $_GET['catagory'];



}else{
  $catagory = 1; //এই কোড $id = 1; না দিলে; যদি সরাসরি view.php হিট করে; তাহলে Error দেখাবেন//
}


ob_start();
?>
  <div class="catagory_display_container">

  <?php 
 
    $result2 = mysqli_query($conn,"SELECT * FROM goods_category where category_name = '$catagory' ") or die(mysqli_error($conn));


    while ($row2 = mysqli_fetch_object($result2) ) {?>  
  <div class="catagory_display">
  <div class="catagory_display_inner" style="background-color: #FDE8C0; padding: 5pt; box-sizing: border-box;  display: flex; flex-direction: column;"  >
  <div>    
    <strong>  
    <a class="category_name" href="product_individual.php?id=<?php echo$row2->id?>" data-category="Food"><?php echo$row2->category_name;?></a>    
    </strong>    
  </div>

  <a href="product_individual.php?id=<?php echo$row2->id?>" data-category="Food">
  <img class="category_image" src='<?php echo"category/$row2->category_picture";?>'>  
  </a>

  <div>
    <a class="aro" style="color: blue;" href="product_individual.php?id=<?php echo$row2->id?>" data-category="Food"><?php echo "বিস্তারিত";?></a>
  </div>
    
   

  </div>

  </div>
  <?php }?>
</div>
  <!-- ------------------------------------ -->
<center><div style="width: 100%; height: 20pt; padding: 5pt; box-sizing: border-box; background-color: #699C91;">অন্যান্য</div><hr>
</center>


<div class="catagory_display_container">
  <?php 
 
    $result2 = mysqli_query($conn,"SELECT * FROM goods_category order by category_name ") or die(mysqli_error($conn));


    while ($row2 = mysqli_fetch_object($result2) ) {?>  
  <div class="catagory_display">
  <div class="catagory_display_inner" style="background-color: #FDE8C0; padding: 5pt; box-sizing: border-box;  display: flex; flex-direction: column;"  >
  <div>    
    <strong>  
    <a class="category_name" href="#" data-category="Food"><?php echo$row2->category_name;?></a>    
    </strong>    
  </div>

  <a href="#" data-category="Food">
  <img class="category_image" src='<?php echo"category/$row2->category_picture";?>'>  
  </a>

  <div>
    <a class="aro" style="color: blue;" href="category_as_individual.php?catagory=<?php echo$row2->category_name?>" data-category="Food"><?php echo "আরও-->>";?></a>
  </div>
    
   

  </div>

  </div>
  <?php }?>

</div>

<?php
// End capturing the output and store it in a variable
$catagory_display_content = ob_get_clean();

// Now include frameForAll.php, which will use $catagory_display_content
include("frameForAll.php");

// mysqli_close($conn); // You might want to close the connection after all database operations
ob_end_flush();
?>



<!DOCTYPE html>
<html>
<head>

  <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">

<meta name="theme-color" content="#FF0000">
    
<title>অনলাইন শপ</title>
    

  
</head>
<body>


<style type="text/css">




</style>


</body>
</html>