www.webdeveloper.com
Results 1 to 5 of 5

Thread: [RESOLVED] adding extra value to text input array

Threaded View

  1. #1
    Join Date
    Jan 2012
    Posts
    34

    resolved [RESOLVED] adding extra value to text input array

    I'm listing out a bunch of products from a database using a while loop and next to it I'm placing the quantity of products. I want to be able to update the quantity, so I've placed it inside of an input field. I've used an array for the input name so that i can grab all of the entries from the while loop. however i want to add more than just the quantity to the array entries.

    HTML Code:
    <input type="text" name="product[]" value="<?=$pro['product_quantity']?>" required>
    This will put the quantity into the array.

    What i want to do is that when the array is received via $_POST i want it to have the product id ( $pro['product_id'] ) followed by the quantity but i only want the value of the text input to show quantity. I can separate the id from the quantity later that's no problem
    Last edited by Da_Elf; 10-22-2012 at 10:43 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles