PHP how to make URL something like product.php?id=1
<p>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.</p>

<pre><code>echo "&lt;p&gt;Product A | &lt;a href='product.php?id=a'&gt;Add to Cart&lt;/a&gt;&lt;/p&gt;";
echo "&lt;p&gt;Product B | &lt;a href='product.php?id=b'&gt;Add to Cart&lt;/a&gt;&lt;/p&gt;";
echo "&lt;p&gt;Product C | &lt;a href='product.php?id=c'&gt;Add to Cart&lt;/a&gt;&lt;/p&gt;";
</code></pre>

<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?</p>

<p>Please refer to a screenshot.</p>

<p><a href="https://i.stack.imgur.com/m8Fn6.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/m8Fn6.jpg" alt="enter image description here"></a></p>