basic question : radio button

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!

Moderator: General Moderators

Post Reply
User avatar
burnhallian
Forum Commoner
Posts: 28
Joined: Tue Jul 12, 2005 2:47 am

basic question : radio button

Post 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>
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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.
Post Reply