Multiple checkboxes

Results 1 to 2 of 2

Thread: Multiple checkboxes

  1. #1
    Join Date
    Dec 1969

    Default Multiple checkboxes

    Hello!<BR><BR>In my ASP page I have 10 checkboxes which are displayed from the following query:<BR><BR>&#060;%sql="select module_id,module_name from module_master"<BR>set rs=ObjDBConn.execute(sql)<BR><BR>if not rs.eof then<BR>Do until rs.eof<BR>%&#062;&#060;input type="checkbox" value="&#060;%=rs(0)%&#062;" name="&#060;%=rs(0)%&#062;"&#062;&#060;%=rs(1)%&#0 62;<BR>&#060;%rs.movenext<BR>Loop<BR>end if<BR>%&#062;<BR><BR>I need to insert the values of the checkboxes selected in the table which looks like(module_id,role_id)<BR><BR>How do I get the values of these many checkboxes. as these are database driven.<BR><BR>Pls help

  2. #2
    Join Date
    Dec 1969

    Default Messed up...

    You have the NAME and the VALUE of the checkbox being identical.<BR><BR>Instead, since these will all be for the same role_id (at least I assume so!), just use <BR> NAME="module_id"<BR>or some such for the name. Then the only values that will show up via<BR> Request("module_id") <BR>will indeed be the ones that were checked.<BR><BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts