<?php
$alldept = ONLINEPAY:: showdept();
$dprepare ="";
$allsession = ONLINEPAY:: showsession();
$tag = $_GET['type'];
$_SESSION['tablename'] =$tag;
?>
    <div class="container" style="position:relative;">
        <form method="POST" action="#">
            <div class="form-group input-group" align="Right">
                <table class="table table-bordered table-hover" align="center">
                    <tr>
                    <div style="margin-top:5px; border-bottom:2px inset #000">
                        <td>
                            <label  style="margin-left:20px" >Level</label>
                            <select id="lev" class="form-control action">
                                <option value="">Choose...</option>
                                <option value="">All</option>
                                <option value="ND">ND</option>
                                <option value="HND">HND</option>
                                <option value="both">ND & HND</option>
                                <option value="pgd">PGD</option>
                                <option value="certificate">Certificate</option>
                            </select>
                        </td>
                        <td>
                            <label  style="margin-left:20px; width:100%" >Programme type</label>
                            <select id="ptype" class="form-control action" style="padding:5px; width:250px; border-radius:5px">
                                <option value="">Choose...</option>
                                <option value="FT">Full Time </option>
                                <option  value="PT"> Part Time </option>
                                            
                                 <option  value="DP">  Daily Part Time </option>
                                
                                <option value="CAP">Continuous Academic Program </option>
                                
                                <option value="EAP">Evening Academic Program</option>
                                <option value="certificate">Certificate </option>
                                
                                <option value="advancecertificate">Advance Certificate</option>
                                <option value="PGD"> PGD</option>
                            </select>
                        </td>
                        <td>
                            <div class="col-md-4">
                                <input type="submit" name="search" id ="search" value="Search" class="btn btn-info" />
                            </div>
                        </td>
                    </tr>
                </table>
            
        </form>
        <div id="mytable" style="width:878px; height:470px; overflow:scroll; background-color:; margin-left:8px "> </div>
    </div>
</body>
 
 
  
<script type="text/javascript">
var ptype = <?php echo json_encode($tag);?>;

$(document).ready(function() {
    $('#search').on("click", function(e){
    e.preventDefault(e);
    
    var lev = $('#lev').val();
    var ptype = $('#ptype').val();
    //alert(lev+ " "+ ptype);
        {
            $.ajax({
            	url:"cert_payment.php",
            	method:"POST",
            	data:{ptype:ptype,lev:lev},
            	success:function(data)
            	{
            	    alert(data);
            		$('#mytable').html(data);
            	}
            });
        }
 });
    
    
    
});
</script>