Page 1 of 1

radio button array?

Posted: Wed Oct 19, 2005 10:58 pm
by jaymoore_299
I have an interactive database manager with each row displayed with 3 options so that only one option can be chosen of the 3, by way of radio buttons. I need an easy way to have all the information put into one array for processing.

right now I have it as:
"radio button name(ex: radio1)"="value (ex: 1)"
row1 data.. radio1=1
row2 data.. radio2=3
row3 data.. radio3=2
row4 data.. radio4=1

I know that checkboxes can be stored as arrays, can the same be done for radio buttons?

Posted: Wed Oct 19, 2005 11:10 pm
by Jenk

Code: Select all

<input type="radio" name="radio1" value="1" />
<input type="radio" name="radio1" value="2" />
<input type="radio" name="radio1" value="3" />
<input type="radio" name="radio1" value="4" />

Code: Select all

echo $_REQUEST['radio1'];