<!doctype html>
<html lang="en">
  <head>
  </head>
  
  <body>
  <!-- home -->
    <div id="left-list">
        <div>
           
                <form action="includes/search_product.php" method="post">
				<div style="padding:5px" class="controls input-group">
                    <input type="text" name="name" class="form-control" placeholder="Chocolate Letters">
					 <div class="input-group-addon">
						<input style="background-color:   transparent;   border:   0px" type="submit" name="submit" value="Search">
					 </div>
				</div>
                </form>
            
            <div class="left-list-home">
                <a href="e-shop.php">
                    <h1>
                        Home
                    </h1>
                </a>
            </div>
        </div>
  <!-- end home -->
  
  <!-- ategorie -->      
        <ul>
            <li>
                <a style="text-decoration:none" data-toggle="collapse" href="#collapseOne">
                    <h1>
                        Chocolates
                    </h1>
                </a>
                
                <div id="collapseOne" class="collapse in">
                    <ul>
                        <?php
							$sql = "select * from ategories where belong='Chocolates'";
							$result = mysqli_query($conn,$sql);
							if ($result->num_rows > 0) {
							while($row = $result->fetch_assoc()) {
							echo '<a href="e-shop.php?ategory='.str_replace(' ','_',$row["ategory"]).'">';
							echo "<li>".$row['ategory']."</li>";
							echo '</a>';
							}}
						?>
                    </ul>
                </div>
            </li>  
        
            <li>
            	<a style="text-decoration:none" data-toggle="collapse" href="#collapsetwo">
                    <h1>
                        Pastries
                    </h1>
                </a>

                <div id="collapsetwo" class="collapse in">
                    <ul>
                         <?php
							$sql = "select * from ategories where belong='Pastries'";
							$result = mysqli_query($conn,$sql);
							if ($result->num_rows > 0) {
							while($row = $result->fetch_assoc()) {
							echo '<a href="e-shop.php?ategory='.str_replace(' ','_',$row["ategory"]).'">';
							echo "<li>".$row['ategory']."</li>";
							echo '</a>';
							}}
						?>
                    </ul>
                </div>
            </li>
            
            <li>
            	<a style="text-decoration:none" data-toggle="collapse" href="#collapsethree">
                    <h1>
                        Bespoke Products for Occasions
                    </h1>
                </a>
                
                <div id="collapsethree" class="collapse in" >
                    <ul>
                    <?php
							$sql = "select * from ategories where belong='Bespoke Products for Occasions'";
							$result = mysqli_query($conn,$sql);
							if ($result->num_rows > 0) {
							while($row = $result->fetch_assoc()) {
							echo '<a href="e-shop.php?ategory='.str_replace(' ','_',$row["ategory"]).'">';
							echo "<li>".$row['ategory']."</li>";
							echo '</a>';
							}}
						?>
                    </ul>
                </div>
            </li>
        </ul>
    </div>
    <!-- end ategorie -->  
  </body>
</html>