Filtering The Display in Tabular


Please briefly explain why you feel this question should be reported .

Report Cancel

I want to make a tabular form that will filter the display using query I used if statement in the

if(!$status) die("Failed to select database!");
@$sql = "SELECT * FROM t_pdf Order by  year desc, dotype asc, ref desc ";
    @$sql = "SELECT * FROM t_pdf where dotype LIKE '%D.C.%' Order by  year desc, dotype asc, ref desc ";

here is my navigation bar

<span id="cnc"> 
<ul class="tabcat">
        <li id="Home" name="menu "><a href="pag.php" class="homeIcon">Home</a></li>
        <li class="tabcat" id="DC" name="menu" value="DC"><a href="pag_DC.php">D.C.</a></li>
        <li class="tabcat" id="DO" name="menu" value="DO"><a href="pag_DO.php">D.O.</a></li>
        <li class="tabcat" id="IC" name="menu" value="IC"><a href="pag_IC.php">I.C.</a></li>
        <li class="tabcat" id="JC" name="menu" value="JC"><a href="pag_JC.php">J.C.</a></li>
        <li class="tabcat" id="MC" name="menu" value="MC"><a href="pag_MC.php">M.C.</a></li>
        <li class="tabcat" id="FC" name="menu" value="FC"><a href="pag_FC.php">F.C.</a></li>
        <li class="tabcat" id="FSC" name="menu" value="FSC"><a href="pag_FSC.php">F.S.C.</a></li>
        <li class="tabcat" id="EO" name="menu" value="EO"><a href="pag_EO.php">E.O</a></li>
        <li class="tabcat" id="MO" name="menu" value="MO"><a href="pag_MO.php">M.O.</a></li>
        <li class="tabcat" id="FCL" name="menu" value="FCL"><a href="pag_FCL.php">F.C.L.</a></li>
        <li class="tabcat" id="memo" name="menu" value="Memo"><a href="pag_memo.php">Memo</a></li>
        <li class="tabcat" id="circular" name="menu" value="Circular"><a href="pag_circular.php">Circular</a></li>

<?php @$_SESSION['nav']=$_POST[menu];?>
<?php @$ser=$_POST[menu];?>

Here is the out

when I click DC, DO,IC etc. it will change it’s sql and edit it with

“Select * from table where control_number Like ‘%D.C.%'”

How could I change the logic in here? I use php here….

0 Answer 6 views 0