Skip to main content
Participant
September 14, 2006
Question

insert behavior query

  • September 14, 2006
  • 1 reply
  • 233 views
Hi there
I wonder if anyone could help.

I have an html form which insert data to a mysql db.

I am sticking at a particular point:

I have three tick boxes ( A , B, C ) if left blank the data in their corresponding db field is 0, if ticked it's 1.
I have three other db fields which I use to check the access level of a user to partuclar leve in the site ( L1, L2, L3 ) they are set to 0 by default

if the user tick the A box, it add a 1 to the L1 box so leave L2 and L3 values are still 0 . all is well and it works

I would like the following, if the user tick B, it should add the value 1 ot L1 AND L2
and If the user tick C, it should add the value 1 to L1, L2 and L3

to sumarise, Is it possible to write data in 2 or more db field from the input of 1 checkbox ( if that make sens )

Any advice would be appreciated

CHeers

Chris








This topic has been closed for replies.

1 reply

Inspiring
September 15, 2006
Yes it is possible to write a SQL statement that will take the data and
manipulate it any way that you want, however you will need to hand code the
whole thing (not that much of a challenge) as the DW standard behaviours
work on a one to one match.

FYI a checkbox only has a value when it it checked. When unchecked it simply
does not exist in terms of passing values when the form is posted.

--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver

Valleybiz Internet Design
www.valleybiz.net

"goasduff" <webforumsuser@macromedia.com> wrote in message
news:eebp9c$mt6$1@forums.macromedia.com...
> Hi there
> I wonder if anyone could help.
>
> I have an html form which insert data to a mysql db.
>
> I am sticking at a particular point:
>
> I have three tick boxes ( A , B, C ) if left blank the data in their
> corresponding db field is 0, if ticked it's 1.
> I have three other db fields which I use to check the access level of a
> user
> to partuclar leve in the site ( L1, L2, L3 ) they are set to 0 by default
>
> if the user tick the A box, it add a 1 to the L1 box so leave L2 and L3
> values
> are still 0 . all is well and it works
>
> I would like the following, if the user tick B, it should add the value 1
> ot
> L1 AND L2
> and If the user tick C, it should add the value 1 to L1, L2 and L3
>
> to sumarise, Is it possible to write data in 2 or more db field from the
> input
> of 1 checkbox ( if that make sens )
>
> Any advice would be appreciated
>
> CHeers
>
> Chris
>
>
>
>
>
>
>
>
>
>