Storing radio button values in database and calculated textbox values in database


Is there a way to store both the value of a radiobutton as well as whether it was selected or not? I can store the selected value in the groupname ok but don’t know how to indicate which radio button it came from.

Also, I have a textinput box which is set to number and gets its values from a calculation of 2 other textinput boxes. The calculation works great. When Iook at that element in serverconnect, it comes acxross as a text box with multiple values text in the Post variables global list. Is there a reason for this? I tried unclicking the multiple values option and even converting it to a number but only 0 is stored in the database not the real calculated value. I don’t get any errors in debug mode.

Not sure what I’m doing wrong?


A radio button has two important attributes, namely ‘name’ and ‘value’. If the radio buttons form a group, i.e. if one button has been selected, the others are not selected, then the ‘name’ value must be the same for each button. When the form is subitted, the ‘value’ value will be posted.

As an example:

<form action="">
<input type=“radio” name=“priority” value=“one” checked> 1<br>
<input type=“radio” name=“priority” value=“two”> 2<br>
<input type=“radio” name=“priority” value=“three”> 3<br>
<input type=“radio” name=“priority” value=“Four”>4<br>

If button three has been selected, all the other buttons will be delselected and the value of ‘three’ will be posted.

Not sure about the multiple values coming from the textinput, it would be great if you expanded the question to include what you have done.

In passing, it is advisable to pose one question oer post. This will make it easier to answer the question.


thanks. yes I understand that is what should be happening. What I find strange is that when I link to the fields to a database in server connect, some fields get posted and some do not. I’ll send a separate post for the other questions.