I have a table where I list products. There is a checkbox next to each item. Once select product button is pressed the <form> is submitted in a GET request.
I can’t find a way to process the information sent in this get request
http://localhost/eComm/selectedproduct.php?product=1&product=2
The $_GET["product"] variable contains only the last value given to the product argument i.e. 2
Am I doing something wrong or is there another way to go about this?
I have a table where I list products. There is a checkbox next to
Share
PHP is … odd.
It can’t handle multiple values with the same name unless that name ends with the characters
[], in which case it will present the data as an array.Change the HTML to:
Then you can access:
(and shove it into a
foretc)