473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

repost, sort of--dynamic checkboxes

Hate to post this in a separate post, but felt that the last thread was too
far down to get noticed. It is called dynamic checkboxes, and it contained
some good advice for me, but it led to another question, and I wanted to go
ahead and post my question here in hopes of getting an answer.

The advice given to me about having a number of checkboxes which are put
onto the page from the database, was to name them all the same thing, and
then, on the next page, do a request.form of that form field name, and it
would return a string.

This worked very well, and I confirmed that if I checked boxes 3, 5, and 9,
I would get (3,5,9) returned to me. However, I am not sure how I can get
these values stored into my database. In my case, I'll want to store the
person's ID, called PersonalID, which I will get another way. Let's assume I
have that value, and it's '1'. I want to insert 1,3 then 1,5, then 1,9 into
the table, into the fields PersonalID and PeopleID, respectively. That's 3
rows in that table, and it is dynamic, so a user could enter 0 to many rows
into this table.

Can someone help me get this syntax? There was a suggestion in the last post
offered to me, but I didn't get it at all.


Jul 19 '05 #1
1 1605
something like....

dim sChecks, arrChecks, personId, x, sSQL

personId=[whereever you get it from]
sChecks=request.form("checkbox_name") & ""

if len(sChecks)>0 then

arrChecks=split(sChecks,",")

for x=lbound(arrChecks) to ubound(arrChecks)

sSQL="insert into ....." 'insert SQL using arrChecks(x) and
personId
oConn.execute sSQL...
next
end if

tim

"middletree" <mi********@htomail.com> wrote in message
news:OO**************@TK2MSFTNGP12.phx.gbl...
Hate to post this in a separate post, but felt that the last thread was too far down to get noticed. It is called dynamic checkboxes, and it contained some good advice for me, but it led to another question, and I wanted to go ahead and post my question here in hopes of getting an answer.

The advice given to me about having a number of checkboxes which are put
onto the page from the database, was to name them all the same thing, and
then, on the next page, do a request.form of that form field name, and it
would return a string.

This worked very well, and I confirmed that if I checked boxes 3, 5, and 9, I would get (3,5,9) returned to me. However, I am not sure how I can get
these values stored into my database. In my case, I'll want to store the
person's ID, called PersonalID, which I will get another way. Let's assume I have that value, and it's '1'. I want to insert 1,3 then 1,5, then 1,9 into the table, into the fields PersonalID and PeopleID, respectively. That's 3 rows in that table, and it is dynamic, so a user could enter 0 to many rows into this table.

Can someone help me get this syntax? There was a suggestion in the last post offered to me, but I didn't get it at all.



Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Kate | last post by:
I have an PHP page that contains several checkboxes. I need to know if the user has check all of the checkboxes before they can proceed to the next page. How do I check there status? And can I...
3
by: Toboja | last post by:
Hello, I have two select lists: Available Sort Options and Selected Sort Options. The user clicks on any of the available sort options and can move them to the selected sort options box. I use...
2
by: NotYetaNurd | last post by:
Hi, I have a panel under which i have lot of checkboxes added during runtime...which can have three values for priority(low,high,medium) i have set docking = top ; now my problem is i have to sort...
2
by: Lincoln Yeoh | last post by:
Sorry for the repost. Just wondering if anyone has a workaround for 7.4? At 11:25 AM 1/27/2004 -0500, Tom Lane wrote: >Martijn van Oosterhout <kleptog@svana.org> writes: > > I'm afraid I'll have...
48
by: Alex Chudnovsky | last post by:
I have come across with what appears to be a significant performance bug in ..NET 2.0 ArrayList.Sort method when compared with Array.Sort on the same data. Same data on the same CPU gets sorted a...
9
by: martin DH | last post by:
I've seen similar posts to what I am looking for but have not been able to successfully use what I have read. I have a form with 4 checkboxes: CkQ1 CkJan CkFeb CkMar I would like to be able to...
1
by: JavaCoder999 | last post by:
I need to create a GUI for a seating plan and I plan on using several rows of checkboxes to create a layout. The only problem is that I don't know how to code these checkboxes over several rows. ...
0
by: apattin | last post by:
Hi, I have been trying to find a reasonable GUI SQL client that displays results without rounding them. I was pointed to IBM's Data Studio, which we've FINALLY installed, but sadly it seems it...
8
by: PeteOlcott | last post by:
http://archive.dojotoolkit.org/nightly/dojotoolkit/dojox/grid/tests/test_change_structure.html I would like to completely understand how GUI controls such as this one are constructed. In the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.