Forum Moderators: open
<input type="hidden" name="my_item" value="123">
<input type="radio" name="your_item" value="456">
<input type="radio" name="your_item" value="789">
my_item=123
your_item=456 OR your_item=789 based on selection
If you name them the same, depending on which variable is parsed first, you will have one value overwriting the other:
<input type="hidden" name="your_item" value="123">
<input type="radio" name="your_item" value="456">
<input type="radio" name="your_item" value="789">
your_item=123
The exception is using some read/parse routines that don't do this, but you still get
your_item=123
your_item.1=456 OR your_item.1=789 based on selection
That's what moltar meant. :-)
<input type="radio" name="my_button" value="value 1" checked>
No good? One of those people who thinks a radio button should not have a default checked state? :-)
On the server side,
if (! $qs{'my_button'}) { $qs{'my_button'} = 'default value'; }
(That's in perl, use the language of your choice.)