How can I make the variable $Category in the mysql query below equal the value chosen in the dropdown list below that?
It seems like a simple concept that can't seem to figure out. It would also be great if the page automatically runs the new query when the dropdown list option changes. Furthermore, it should default to showing all records when the page first loads.
MYSQL PHP QUERY
$query = mysql_query("SELECT * FROM tblClients WHERE tblclients.package = 'standard' and tblclients.category = '$Category' LIMIT 0, 9", $connection);
DROPDOWN LIST
<section class="main">
<div class="wrapper">
<div id="dd" class="wrapper-dropdown-3" tabindex="1">
<span>View By Category</span>
<ul class="dropdown">
<?php while ($rows = mysql_fetch_array($query_category)) { ?>
<li><a class="<?php echo $rows['category']; ?>"><?php echo $rows['category']; ?></a></li>
<?php } ?>
</ul>
</div>
</div>
</section>