Mikee
Active Member
- Jul 8, 2017
- 162
- 102
I have a set of links as seen here
I want to make it so when you click on it it sends a GET request and then I'll be able to organize the articles/blog posts by GET request. i.e. technology will only sort the technology tagged articles.
But i don't know how to make the <a href> links submit GET
Here is my code so far for the sidebar. The PHP stuff gets pulled from another file that has an array[] of categories, and the rowCount.
I want to make it so when you click on it it sends a GET request and then I'll be able to organize the articles/blog posts by GET request. i.e. technology will only sort the technology tagged articles.
But i don't know how to make the <a href> links submit GET
Code:
<div class="lx-sidebar-item">
<div class="lx-sidebar-item-title">
<h3>Categories</h3>
</div>
<form method = "GET">
<div class="lx-sidebar-item-content">
<div class="lx-links-list">
<ul>
<?php $i = 0; while ($i < $numOfRowsCategories){
echo '
<form action="" method="post">
<li><a href="?category=">';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>
Here is my code so far for the sidebar. The PHP stuff gets pulled from another file that has an array[] of categories, and the rowCount.
Last edited by a moderator: