Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

radio button loop

Status
Not open for further replies.

mrobinson

MIS
Oct 11, 2002
36
GB
I have created a php form and am displaying some html which includes radio buttons. The form takes information from a database then displays it in a list in the form and in the while loop that does this it displays radio buttons next to each data item. I can get this to disply everything ok but im not sure how i would go about naming each radio button differently within the loop so they can be called on the following form individually. could someone please advise me on the best approach for this.

thanks
 
Normally, a group of radio buttons share the same name so that only one can be checked, the value of each is unique. You can point to each button much like you would address an array: radiobuttonname[0], radiobuttonname[1], etc.

If you're not concerned about whether more than one can be checked, switch to checkboxes and give each on a unique name.

There's always a better way. The fun is trying to find it!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top