A little while ago, I asked a question about using the same input name/hidden name multiple times in a page, and got an answer that did not work as it suggested the I had to use to put brackets after the field name, like partno[]
.
I cannot use this in my form, as the cart it is being sent to only recognizes certain field names like: partno, item, price, qty, etc. (I cannot use partno[], item[]
, etc.) So I really need to be able to get all the values for each identical field name used multiple times. When I use the method GET
, it will display all the values for each field name used in the address bar. You can try this and submit the form. Look at the url in the address bar.
My new question is: Is there a way in PHP to capture all the information passed using the POST
method? (like what shows up in the address bar in the example above but using POST
, not GET
). I can parse it if I can figure out a way to capture it.
Thanks, Kelly
You just use $_POST
instead of $_GET
.
So if you were using get in the following way:
?something=somevalue
And were catching it with $_GET['something']
, you would now use $_POST['something']
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With