creating Dynamic controls in html with different names

ggeoff

New Member
I am creating radiobuttons in HTML .I am getting data from SQL Database.I am creating an attendence form in which there will be \[code\]student name,Present Radio button ,Absent Radio button.\[/code\]I put the Present and Absent Radio button in a single Group,(so that only one could be clicked.The problem is that I can't create more than one radio group..My code is\[code\]<html><tr><td><?php echo $i;?></td> // Serial Number<td> <label><?php echo $att['std_name'];?></label></td> //student name<td><input type="radio" name="std_r[]" id="std_r[]"></td> // for present<td><input type="radio" name="std_r[]" id="std_c[]"></td> // for absent<td><input type="hidden" value="http://stackoverflow.com/questions/10564444/<?php echo $att['rollnum'];?>" > </td> //hidden field that will take roll number of student on next page</tr></html><?php\[/code\]I want that for each student there should be seperate group of radio buttons.thats why i want to create buttons with different name.Anyone who can help me with thisThanks
 
Back
Top