PHP and ceckboxes

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Meena

    PHP and ceckboxes

    Dear All, i have a db table that contains 1s and 0s and i need to show
    back these values with checkboxes, ex: if i have a table called t1 that
    contains c1 c2 and c3 and all have values of 1, now i need to display 3
    checkboxes which will be checked because the values in the db is 1. if
    any of the values is 0 then i shall display the associated checkbox as
    unchecked, i now i can do that by simply checking the returned value
    from the database by an if statement, but i need a smarter way, plz
    reply back with explanation cz i'm just a beginner thnx

  • Jerry Stuckle

    #2
    Re: PHP and ceckboxes

    Meena wrote:[color=blue]
    > Dear All, i have a db table that contains 1s and 0s and i need to show
    > back these values with checkboxes, ex: if i have a table called t1 that
    > contains c1 c2 and c3 and all have values of 1, now i need to display 3
    > checkboxes which will be checked because the values in the db is 1. if
    > any of the values is 0 then i shall display the associated checkbox as
    > unchecked, i now i can do that by simply checking the returned value
    > from the database by an if statement, but i need a smarter way, plz
    > reply back with explanation cz i'm just a beginner thnx
    >[/color]

    What have you tried so far?

    --
    =============== ===
    Remove the "x" from my email address
    Jerry Stuckle
    JDS Computer Training Corp.
    jstucklex@attgl obal.net
    =============== ===

    Comment

    Working...