Need help with INSERT in my database from dropdown

Results 1 to 2 of 2

Thread: Need help with INSERT in my database from dropdown

  1. #1
    Join Date
    Dec 1969
    Posts
    2,092

    Default Need help with INSERT in my database from dropdown

    Hi<BR>I&#039ve created a dropdownbox that is multiple:<BR>_____________________________________ ____________________________<BR>&#060;SELECT id=slcBox name=slcBox MULTIPLE size=10&#062;<BR>&#060;%Do until rst.EOF%&#062;<BR>&#060;OPTION&#062;&#060;%=rst("S otware") & " & " & rst("Version")%&#062;<BR><BR>&#060;%<BR>rst.MoveNe xt<BR>Loop<BR>%&#062;<BR>&#060;/SELECT&#062;<BR>__________________________________ _______________________________<BR><BR>OK that gives me like 20 items in my dropdown, the use can choose more then one by holding the CRTL key<BR>So my question is How can I INSERT in my DATABASE the values that the user has choosen in my dropdownbox! <BR><BR>Second question: Is it possible to do it in one single Query?<BR>Thanks<BR>

  2. #2
    Join Date
    Dec 1969
    Posts
    22

    Default RE: Need help with INSERT in my database from drop

    You could use Request.Form("slcbox").Count to get the number of values the user has selected. Ie, if he has selected two values the above statement returns 2.<BR>you could access each of them by using request.form("slcbox")(i),<BR>where i is the index, ie, the first item or the second one and so on...U could use the same in the insert statement too...<BR>- Hope it helps..

Posting Permissions

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