I have a similar query, which goes this way.

I am actually printing all the records in the table and creating a href

echo "<td>" . '<a href="products.php">' . $row['SubcategoryName'] . '</a>' . "</td>";

now my problem is i need the value of the $row['SubcategoryName'] that I had clicked.