Hi Guys, if anybody there to help me out in the issue below please:
I am learning PHP/PDO via project in youtube. by learning project I have created code below which is all fine but as soon as I click on a sub category, it shows products into center column but sub category list get vanish, I don't know what mistake I have done, I tried everything to redirect it to its own location i.e. into the left column but remain unsuccessful. it will be appreciated if someone help me in resolving the issue. code is here below:
function for sub cat list:
$subcat_list=$conn->prepare("select * from sub_cat where cat_id='$cat_id'");
echo "<li><a href='cat-detail.php?subcat_id=".$row_subcat_list['sub_cat_id']."'>".$row_subcat_list['sub_cat_name']."</a></li>";
function called into left column:
<?php echo list_all_cat(); ?>
<?php echo list_all_subcat(); ?>
cat-detail.php cpntains below code in body:
bodycenter contains below code in body:
<ul><?php echo cat_detail();?></ul><br clear='all'> //this will show details into center
<ul><?php echo subcat_detail();?></ul><br clear='all'>
Everything is working fine When I click on a Category in left column up, category list remain there and shows the related Sub Category which is OK
But when I click on a Sub Category into sub cat List then everything works fine except sub cat list which go went gone and I again need to click on category.
I remain failed to resolve this issue if anybody can help in this I will be thankful to him/her please.