Archive
You are viewing all articles posted in july 2008
Recent articles can be found on the homepage.
How to send multiple values through one form button
posted on 04 July 2008 (09:28 AM)
Sometimes you want to have a form with multiple "actions". For instance, in a webshop, you want to list all your products, each paired up with an individual submit button to add that particular product to a shopping cart.
But how can you, on the server-side, differentiate between products?
It gets even more difficult when you have lots of hidden data you wish to send alongside the name or id of the product, but you want to show only one button.
There are a couple of ways to achieve this, all with their own pros and cons. Below I will list some options.