I have a dynamic menu where it is generated from the tables in my database.
<?php
$results = DB::query('select * from categoria');
foreach ($results as $row) {
echo '<a href="#" class="categoria">'.$row['Nome'].'</a>';
}
?>
I want to make a PHP code that generates a default page for each category, where all products in this category clicked on that page.
When I enter <a href="paginadeprocessamento.php" class="categoria">
I can not get the category that the user clicked on the menu.
I have tried to use name=""
but I think it only works for form.
In short: I want to generate a page with all the products in the category where the user clicked on the dynamic menu, but I can not identify them later in the php he clicked on.
I gave a quick hand on htacess and I think it can help me, but I think I might have another solution for that.