-1

I tried following code GET URL parameter in PHP to fetch URL parameters into a string but none of the answer worked. I tried $_SERVER['QUERY_STRING'];. This worked some how and gives a query string as action=quantity_updated&id=1&name=Top&price=24&qty=4 from this URL: http://localhost/Ecommerce/cart.php?action=quantity_updated&id=1&name=Top&price=24&qty=4. Some suggesstions please. How can I fetch each parameter in a separate php variables?

Community
  • 1
  • 1
tabia
  • 631
  • 2
  • 10
  • 33

1 Answers1

0
$action = $_GET['action'];
$id = $_GEt['id'];
$name = $_GET['name'];

and so on

Adam
  • 455
  • 1
  • 3
  • 18