I created a recipe site that displays various dishes, and I'm tickled pink that I got it to work (first time doing this!) But I'd like to have pages that displays dishes by its category. The column that houses this is called "category" which has 7 total: Appetizers & Beverages, Soups & Salads, Side Items, Main Dishes, Baked Goods, Desserts, and Cookies & Candy.
I have this page connected to a "connection.php" page, but here's the code in question:
<!-- Page Title-->
<div class="row">
<div class="col-lg-12">
<h1 class="page-header">Appetizers & Beverages</h1>
</div>
</div>
<!-- /Page Title -->
<!-- Displayed Data-->
<?php
$sql = "SELECT id, category, bilde, title FROM oppskrift_table ORDER BY title ";
$result = mysqli_query($con, $sql);
if(mysqli_num_rows($result) > 0 ){
while($row = mysqli_fetch_assoc($result)){
?>
<div align="center" class="col-md-3"> <a href="#"> <img class="img-responsive img-cat" src="bilder/rBilder/<?=$row['bilde']?>" width="250" alt=""> </a>
<h4 style="max-width:250px;"> <a href="#" class="dishes">
<?=$row['title']?>
</a> </h4>
</div>
<?php
}
}
?>
<!-- END Displayed Data-->
</div>
How can I tweak this so that only the category Appetizers & Beverages shows up on the page?