Reputation: 183
I'm learning PHP and MySQL and I have a question. I've seen that a lot of sites use this, for example:
http://www.example.com/index.php?product_id=8
or
http://www.example.com/index.php?cattegory=headphones
If you change the values in the URL, the content the page displays changes, so I would like to know how to use that in my webpage, thanks!
Upvotes: 0
Views: 1766
Reputation: 878
You can check for the GET parameter included in the url...
if($_GET['product_id' == 8]) { ... }
Upvotes: 1