I am doing a simple php cart. Basically is for learning purpose and I am trying to search solution for my question. However, i am not sure what is the keyword for my question. Hence, I post it here.
echo "<p>Product A | <a href='product.php?id=a'>Add to Cart</a></p>";
echo "<p>Product B | <a href='product.php?id=b'>Add to Cart</a></p>";
echo "<p>Product C | <a href='product.php?id=c'>Add to Cart</a></p>";
Basically, every product shares the same landing page -> product.php just like normal shopping cart. So when user clicks product A "Add to Cart", it will land on produt.php?id=a , if product B, then will be produt.php?id=b . My questions is how to make the url sth like I mentioned?
Please refer to a screenshot.