473,324 Members | 2,501 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,324 software developers and data experts.

Checkboxes - how to process results

I'm not sure which part needs fixing - consider all of it fair game
for suggestions.

I'm working on a site that allows users to select a postcard to mail.
They can also select a predefined note to place on the postcard. Not
all notes go will all postcards.

So - I have 3 tables: cards with cardID, cardDesc, cardFront,
cardBack, cardActive, notes with noteID, noteDesc, noteImage,
noteActive and finally I have cardnote with just cardID and noteID -
showing the pairs that work together.

My problem shows up in the notes admin area. I currently build a list
of potential cards to select from with checkboxes named by cardID.
When the form is submitted, I end up with an unknown number of
"[104]=>on, [147]=>on, [116]=>on" in my POST results - depending on
how many cards they figured this note works with. (I can't just check
for "on"s as the cardActive setting is also presented as a checkbox...
at least for now.)

If I'm working with note 117 at the moment, I need to insert the pairs
(104, 117), (147, 117) (116, 117) into cardnote.

I could use some help with the "right" way to handle this. I'm unsure
if I need to change the way it's presented on the web page, or the way
I have it stored in the database or just some more advanced php
handling of what's already there.

thanks
Jim
Feb 16 '06 #1
2 1281
I accidently clicked wrong and an incomple reply may have been entered.

My suggestion is this:
Have all the cards have checkboxes. Immediately to the right of each
card checkbox would be a dropdown options list with all the applicable
cards. This list would be the result of a sql query over the third
table of yours.

That way there is no confusion. He checks a box and can select what he
wants. The drop downs can all have the same name with different
indexes that match the indexes for the checkboxes of cards chosen.

Coding would be easier and it is less confusing to the user.

Just a suggestion.

Shelly

Feb 17 '06 #2
That should have said a dropdown list of applicable notes.

<sh*******@gmail.com> wrote in message
news:11*********************@g47g2000cwa.googlegro ups.com...
I accidently clicked wrong and an incomple reply may have been entered.

My suggestion is this:
Have all the cards have checkboxes. Immediately to the right of each
card checkbox would be a dropdown options list with all the applicable
cards. This list would be the result of a sql query over the third
table of yours.

That way there is no confusion. He checks a box and can select what he
wants. The drop downs can all have the same name with different
indexes that match the indexes for the checkboxes of cards chosen.

Coding would be easier and it is less confusing to the user.

Just a suggestion.

Shelly

Feb 18 '06 #3

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

Similar topics

0
by: Frank Collins | last post by:
Can anyone point me to some good examples on the web of using values from dynamically created checkboxes on forms in ASP, particularly relating to INSERTING those values into a SQL or Access...
8
by: DylanM | last post by:
I have some checkboxes that are generated from the results of a database search. At the moment, the checkboxes are part of a table making up a form. Users are going through the form, clicking the...
0
by: Noitanon | last post by:
Hello, Looking for people to allow me hints, links, book chapter references on making a deployment projekt in my .net (C#) windows forms Solution that results in an installation giving user...
1
by: wolfing1 | last post by:
I'd like to have an 'approve' and 'reject' option for each record in a list, and a 'process' button. When this button it's pressed, then it would post to the same page which would update (or add)...
3
by: Jimmy | last post by:
Hi I have build a datalist with checkboxes in it and after a postback the state of the checkboxes have not been saved. I have enabled the viewstate of all the controls on this page. What do I...
0
by: Faybert | last post by:
Hello, and Thanks in advance for any light you might shed on my troubles. I'm trying to setup a series of checkboxes, or a checkboxlist to control the results that are shown on a gridview...
5
by: hugonot | last post by:
I have got a problem with checkboxes array and the form. I have the results from table (MySQL) and checkbox (form) near the results. I use: echo "<input type=checkbox name=box value=".$.">"; for...
0
by: krokador | last post by:
This is doing my head in... We're starting to migrate our report-printing and such (forms included) to pdf - using xml files and nFOP with asp.net. In this case I have to print out a form which...
3
sunbin
by: sunbin | last post by:
Hi, I am having in a Trouble when working with dynamic checkboxes (i.e. checkboxes with the same name, e.g. <input type="checkbox" name = "check" value="dynamic integer value">) I have...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.