I have a relational database with two tables that both hold subcat_id. What I want to do is when a link is clicked to return results from the second table that have the same subcat_id as the link that has been clicked.
For example:
subcat_id: 1 = SubCat1
subcat_id: 2 = SubCat2
subcat_id: 3 = SubCat3
When I click on SubCat1 results should be returned from the second table with a subcat_id of 1 but as it is all results are being returned which I don't want!!
The code I am using for the link is
<a href="topic.php?subcat_id=<?php echo $row_SubCategory['subcat_id']; ?>"><?php echo $row_SubCategory['subcat']; ?></a>
I know I haven' explained this very well but if anyone can make sense of what I'm trying to achieve I would very much appreciate some help!
Thankyou in advance...
Rachel
For example:
subcat_id: 1 = SubCat1
subcat_id: 2 = SubCat2
subcat_id: 3 = SubCat3
When I click on SubCat1 results should be returned from the second table with a subcat_id of 1 but as it is all results are being returned which I don't want!!
The code I am using for the link is
<a href="topic.php?subcat_id=<?php echo $row_SubCategory['subcat_id']; ?>"><?php echo $row_SubCategory['subcat']; ?></a>
I know I haven' explained this very well but if anyone can make sense of what I'm trying to achieve I would very much appreciate some help!
Thankyou in advance...
Rachel