Page 1 of 1

Grabbing $_POST['array[]']

Posted: Thu Jun 25, 2009 1:34 pm
by mischievous
Hey guys I am trying to group items in a field with an array?

Code: Select all

<input class="wishlist_qty" name="quanity[{wli_id}]" type="text" value="{quantity}" size="2" maxlength="3" />
Then im going to basically do an array_keys($quanity) to find the id of each item set in order to run an update quantity query on them?

Is this possible and how would i go about doing that?

Re: Grabbing $_POST['array[]']

Posted: Thu Jun 25, 2009 2:08 pm
by requinix
$_POST["quanity"] will be an array of id => quantity.

And, uh, "quanity"? Might you be missing a letter there?

Re: Grabbing $_POST['array[]']

Posted: Thu Jun 25, 2009 3:33 pm
by mischievous
figured it out... lol and yes it was a typo! :dubious: