Jump to content

Form field values into an array


toyfruit

Recommended Posts

Hi all.

I'm working on a shopping cart, I need to update multiple item quantities in one go (by pressing an update button).

 

Each item has an input text field displaying the current quantity.

 

Say I have 3 items in my cart, each one has a quantity of say '1'. I want to be able to change each quantity, for example:

item one = 3

item two = 6

item three = 8

 

and then click one update button which will then reload the page and display the new values in the input quantity field - I can then update the cost of the cart with the new values.

 

Could someone please explain how I can grab the values from each quantity input field, maybe put them in an array, then once the page has reloaded iterate through the array and apply the new value of each items quantity to each items input field.

 

 

Link to comment
https://forums.phpfreaks.com/topic/123469-form-field-values-into-an-array/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.