PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Lets say you have a radio button, well you have two of them with the same name.. so you can only choose one of them, is there any way to include a hidden variable depending on which 1 is changed?
for example
radiobutton1 - value 1
radiobutton2 - value 2
if radiobutton1 is selected add value 3
if radiobutton2 is selected add value 4
so now you have value 1 and 3 if radio button 1 is selected
2 and 4 if radiobutton2 is selected
To do anything with a radio button before it's submitted would mean a client side solution. Though i can't see a need for what you want to do. You know which one was selected once it's posted so you can do anything with the value after it's posted, ie on the server side.
*shrug*
if necessary, concat the string from two vars and explode it on the other end. prolly easier to just write a switch on the script side though. If this is user input you need to trap, then you can write a quick javascript to update a hidden input on the fly...