LOOP Syntax

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ddtpmyra
    Contributor
    • Jun 2008
    • 333

    LOOP Syntax

    I have check box on my page which has its equivalent value. How do I insert the value inside my tables in single row for each check box using LOOP

    ex.

    Code:
    <input type="checkbox" name="chk1" value="Y"
    <?php if $value=='Karen Lincoln'){ echo "checked=\"true\""; }?>>CAT   
    <input type="checkbox" name="chk2" value="Y"
    <?php if($value=='Karen Lincoln'){ echo "checked=\"true\""; }?>>DOG
    Now I wanted to insert the value on my table structure like this
    ID | NAME
    --------------
    1 | CAT
    2 | DOG
  • Atli
    Recognized Expert Expert
    • Nov 2006
    • 5062

    #2
    Hi.

    Not quite sure what you are asking.
    Could you elaborate?

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      the correct value for the checked attribute is "checked".

      Comment

      Working...