i have create searching bar with filter button that can search between Teacher and Student name. First i can search to my database with fix to student but when i try to use filter button nothing send value from dropdown button So this is my poor code please come and help me
HTML:
<form method="post" action="<?php echo $_SERVER['SCRIPT_NAME']; ?>">
<div class="input-group">
<div class="input-group-btn search-panel">
<button name="filter" type="button" class="btn btn-primary dropdown-toggle" data-toggle="dropdown" href="#" id="dropdownMenu1">
<span class="selection pull-left">Select an option</span></button>
<ul class="dropdown-menu" role="menu" aria-labelledby="dropdownMenu1" style="box-shadow:0px 6px 12px rgba(0, 0, 0, 0.176)">
<li><a href="#Teacher" class="" data-value="Teacher"><span>Teacher</span></a></li>
<li><a href="#Student" class="" data-value="Student"><span>Student</span></a></li>
<li class="divider"></li>
<li><a href="#all">All</a></li>
</ul>
</div>
<!-- <input type="hidden" name="search_param" value="all" id="search_param"> -->
<input name="txtSearch" type="text" class="form-control" id="txtSearch" placeholder="Search term..."
value="<?php echo $wordSearch; ?>">
<span class="input-group-btn">
<button id="btnSearch" class="btn btn-primary" type="submit">
<span class="glyphicon glyphicon-search"></span></button>
</span>
</div>
</form>
and this is my JS
<script type="text/javascript">
$(".dropdown-menu").on('click', 'li a', function(){
var selText = $(this).children("span").html();
$(this).parent('li').siblings().removeClass('active');
$('#vl').val($(this).attr('data-value'));
$(this).parents('.input-group-btn').find('.selection').html(selText);
$(this).parents('li').addClass("active");
});
</script>
I have no idea about PHP PS. Everything are under the same page (pls see attached picture below) http://upic.me/i/hg/ssssss.jpg