https://i.stack.imgur.com/IUy2H.jpg
As seen in the image, I have a set of categories. I want, when I click on a category, it reorganizes the blog posts by category. In order to do this I need to send a GET on the side. But I can't figure it out.
<div class="lx-sidebar-item">
<div class="lx-sidebar-item-title">
<h3>Categories</h3>
</div>
<div class="lx-sidebar-item-content">
<div class="lx-links-list">
<ul>
<?php $i = 0; while ($i < $numOfRowsCategories){
echo '<li><a href="">';echo $categories[0]; array_shift($categories); echo'<span>';echo $amount[0]; array_shift($amount);'</span></a></li>';$i++;}
?>
</ul>
</form>
<div class="lx-clear-fix"></div>
</div>
</div>
</div>
The numOfRowsCategoriesis just a rowCount of the cateogires table in the database. and the $categories is just an array from the database of all categories.
i tried this solution, which said to use buttons instead How can I submit a POST form using the <a href="..."> tag?
Although it works in theory, I can't figure out how to style the button to make it look like my current page.