Page 1 of 1

basic question : radio button

Posted: Wed Sep 14, 2005 1:58 am
by burnhallian
Just a basic question :D

how would i enter the value from this radio button into the mysql table and what should be the attributes of mysql table ?

Also once i have to echo the results from database how would i get the value of radio button.


<tr><td> How would you characterize the quality of this output ?


<input type="radio" name="character" value="sig" checked> Significant breakthrough

<input type="radio" name="character" value="maj" > Major improvement

<input type="radio" name="character" value="min" > Minor improvement
<HR>
</td></tr>

Posted: Wed Sep 14, 2005 2:04 am
by feyd
as far as storing the "selection" of the radio button group, simply store the value, that's what you get in the submission :P

Depending on your requirements, I'd either use an object to create the radio group, or pull the various parts from [a] seperate table(s). For rebuilding the selected answer, simply iterating over the "options" looking at values, match up the stored value to the current value.