checkboxes(mult inserts)

Results 1 to 5 of 5

Thread: checkboxes(mult inserts)

  1. #1
    Join Date
    Dec 1969

    Default checkboxes(mult inserts)

    I have several checkboxes in my form, and for each one that happens to be checked, I want an insert for each one checked. (into the same table) How would I go about doing that and what would the code look like?

  2. #2
    Heaven's Martini Guest

    Default RE: checkboxes(mult inserts)

    in Norbonics pseudo.<BR><BR>name all the checkboxes the same<BR><BR>put whatever data is impotant in the value property<BR><BR>post form.<BR><BR>split checkbox name<BR><BR>for i = 0 to ubound(arraycreatedbysplit)<BR> insert<BR>next<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default RE: checkboxes(mult inserts)

    This also works, whichever you prefer:<BR><BR> Dim iTmp, sSQL<BR> For iTmp = 1 To request.form("chkBox").Count<BR> sSQL = "INSERT INTO table (id, field) VALUES (" & Request.form("chkBox")(iTmp) & ",&#039;foo&#039;)"<BR> Response.Write(sSQL)<BR> Next<BR><BR>Just as the previous reply, name all checkboxes the same. Replace the response.write with an execute command.

  4. #4
    django reinhardt Guest

    Default are you sure...;re using the right family of -bonics?<BR><BR>&#062;impotant

  5. #5
    Heaven's Martini Guest

    Default RE: are you sure...

    I tink sew.<BR><BR>dats how itsaid up hear

Posting Permissions

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