Grabbing $_POST['array[]']

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mischievous
Forum Commoner
Posts: 71
Joined: Sun Apr 19, 2009 8:59 pm

Grabbing $_POST['array[]']

Post 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?
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

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

Post by requinix »

$_POST["quanity"] will be an array of id => quantity.

And, uh, "quanity"? Might you be missing a letter there?
mischievous
Forum Commoner
Posts: 71
Joined: Sun Apr 19, 2009 8:59 pm

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

Post by mischievous »

figured it out... lol and yes it was a typo! :dubious:
Post Reply