Source code is showing 16 items as requested by LIMIT. However all are only the first item in the column 'category'. How can i get this to show the first 16 rows of the column, not just the first one.
<div id="contentContainer" class="trans3d">
<?php include("../scripts/db.php");
$query="SELECT category FROM stories LIMIT 16";
$result=mysqli_query($connection,$query);
?>
<section id="carouselContainer" class="trans3d">
<?php
while($data=mysqli_fetch_assoc($result)):
$genre=$data['category'];
$genre_path=$genre.".php";
$genre_img_path="../images/genre_images/".$genre.".jpg";
?>
<a href="$genre_path">
<figure class="carouselItem trans3d">
<?php echo $genre;?>
<img src="<?php echo $genre_img_path;?>" alt=""/>
</figure>
</a>
<?php
endwhile;
mysqli_close($connection);
?>
</section>
</div>