<div class="col-xs-4 pull-right">
<div class="input-group search-bar">
<div class="input-group-btn search-panel">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span id="search_concept">Filter by</span> <span class="caret"></span>
</button>
<?php $querySelectCategory = "SELECT * FROM auction_items_category";
$stmtSelectCategory = $conn->prepare($querySelectCategory);
$stmtSelectCategory->execute();
?>
<ul class="dropdown-menu" role="menu" id ="menu">
<?php while ($rowSelectCategory = $stmtSelectCategory->fetch()) {?>
<li id = "<?php echo $rowSelectCategory['categoryName'];?>"><a href="#<?php echo $rowSelectCategory['categoryName'];?>"><?php echo $rowSelectCategory['categoryName'];?></a></li>
<?php }?>
<li><a href="#all">Anything</a></li>
</ul>
</div>
<input type="text" id="searchTxt" class="form-control" placeholder="Search term...">
<span class="input-group-btn">
<button class="btn btn-default" id ="submitSearch" type="button"><span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</div>
First i get all the value from database and then display into dropdown menu,but how can i get the dropdown value when the user click the search button? Above is my code and result.