altctrldel
Technical User
- Jul 26, 2003
- 30
is it possible to pass 2 values in a option/select/check box?
here is my current script:
well it gets data from a row which has prices for 1, 2 and 3 years and displays them in three option boxes with their prices as the values.
Problem is that I want to also pass how many years they have selected along with the price when they submit the form so that I can also enter them into two seperate fields; lets say price and year.
I was thinking if I can use something like:
checkbox 1 = value=1$one
checkbox 2 = value=2$two
checkbox 3 = value=3$three
where in the first digit will be considered as the years and from the 2nd digit till the end would be considered as the price. But I don't know how to do that in php.
thank you for reading.
here is my current script:
Code:
<input name=\"planyr\" type=\"radio\" value=\"[b]$one[/b]\" checked=\"checked\" />1 Year Extended Warranty Plan (<strong>[b]$one[/b] dollars</strong>)
well it gets data from a row which has prices for 1, 2 and 3 years and displays them in three option boxes with their prices as the values.
Problem is that I want to also pass how many years they have selected along with the price when they submit the form so that I can also enter them into two seperate fields; lets say price and year.
I was thinking if I can use something like:
checkbox 1 = value=1$one
checkbox 2 = value=2$two
checkbox 3 = value=3$three
where in the first digit will be considered as the years and from the 2nd digit till the end would be considered as the price. But I don't know how to do that in php.
thank you for reading.