Ji H. Park wrote:
*The question: "How would you have multiple text input forms (on
shopping cart page) with different inputted data (product quantities)
submitted for querying the database (for changing the quantity of
multiple products in the shopping cart at the same time)?**"*
*Here is an ideal example to clarify the matter:*
When a customer wants to change quantities of multiple products all at
once in the shopping cart, all the quantities has to be changed at the
same time just by clicking a button called (e.g. Update Quantity).
*Issue*: Currently I have update quantity buttons for each product,
which isn't convenient.
I would appreciate any tips, techniques, comments, or reference to any
website regarding this issue at your repository, thanks!
Don't provide a button at all. Place the quantity for each item in a
text input field so that it may be edited by the user before submission.
I'm guessing that your page may presently be showing the details of the
item(s) as, say, a regular HTML table, with hidden form fields for the
data. But, instead of having the quantity hidden, place it in a normal
field. This way, any, all, or none of the quantities may be updated in
one POST.
Or, if your cart resides solely in $_SESSION, you may still provide the
quantity fields and update later.
brian
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php