Help with populating checkboxes...

Discussion in 'PHP' started by pepe_lepew1962, Apr 8, 2010.

  1. #1
    I am having problems with populating checkboxes. After I call up a record, one of the fields has a bunch of characters that I use to determine which checkboxes to populate on the form. I extract each character via "strpos" to variables. I then have the checkbox form check if the status is "on". That all seems to work fine until I want to change the status of the checkboxes. The change is somehow not being taken over. I know how to update the record of the change, but I have to be able to change the fields/variables first.
    <?php
    //
    //
    $pepe01 = strpos($pepe00, "A");
    $pepe02 = strpos($pepe00, "B");
    //
    //
    if ($pepe01 == "A")
    {
    $pepe11 = "on";
    }
    //
    //
    ?>
    <html>
    <tr>
    <td align="left" width="35"><font color="#00ff00" face="Arial" size="2">&nbsp;</font>
    <input type="checkbox" name="checkbox01" <?php if($pepe11 == "on"){echo "CHECKED";}?>></td>
    <td align="left"><font color="#00FF00" face="Arial" size="2">&nbsp; Alex</font></td>
    </tr>
    </html>
     
    pepe_lepew1962, Apr 8, 2010 IP
  2. creativeGenius

    creativeGenius Well-Known Member

    Messages:
    273
    Likes Received:
    5
    Best Answers:
    1
    Trophy Points:
    120
    #2
    creativeGenius, Apr 8, 2010 IP