multi dimensional array in form
-
i have a survey which involves multiple radiobuttons what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one. in php you could do it with a single array as you name each row of radio button differently: 1st row: name='array[0]' 2nd: name='array[1]' in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like 1st row: name='array' 2nd name='array' then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked.. thankyou
-
i have a survey which involves multiple radiobuttons what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one. in php you could do it with a single array as you name each row of radio button differently: 1st row: name='array[0]' 2nd: name='array[1]' in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like 1st row: name='array' 2nd name='array' then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked.. thankyou
Why would you use a multi dimensional array for this? As each row of radio buttons only can have one button selected, you only need one value to represent each row. There is no difference in the html used by PHP and ASP.NET. (Actually they don't even care if it is html code or not.) You can name your radio buttons exactly the same using ASP.NET as you did using PHP. --- b { font-weight: normal; }