how to show multiple checkboxes checked in Core PHP Edit Page:

ps: array data

<div class="controls controls-row">
<?php
$tenses = mysqli_query($conn, "SELECT * from tenses");
if(sizeof($tenses) > 0)
{
foreach($tenses as $tens)
{
?>
<div class="span3" style="margin-left:30px;">
<label class="checkbox-inline"><input type="checkbox" name="tenses[]" value="<?php echo $tens['pktenseid']; ?>"> <?php echo $tens['tense_name']; ?></label></div>
<?php
}
}
?>
</div>

    This is a checked box in HTML:

    <input type='checkbox' checked>

    Of course, I assume you have some criteria for knowing which boxes are, or are not, checked ... but I don't see that in the question ....

    dalecosp <label class="checkbox-inline"><input type="checkbox" name="tenses[]" value="<?php echo $tens['pktenseid']; ?>"
    <?php if(in_array($tens['tense_name'],$tensesarr)) { echo "checked"; } ?> > <?php echo $tens['tense_name']; ?>
    </label>
    This is my code i want to show only selected checkboxes in edit page

      12 days later
      8 months later

      Did you find an answer? I belive that I really need the same help, because I am not very competent in programming. I have my own company and often in such questions I can consult with the programmer that is working with custom developing for my firm. Now he is creating a custom version of Salesforce CRM system. To be honest, I don't understand well is it nice for my business to realize the migration from classic to lightning version. But my developed said that it will be nice. Can I believe him in this aspect, what do you think?

      [Mod: removed potentially spammy-looking link]

      LucyaSmit
      Why do you think this question has anything to do with your situation?

        Write a Reply...