dimanche 2 juin 2019

How to get variable/inconstant checkbox id and values in j query?

I am getting all the community name from sql database and showing drop-down with checkbox. for that i am using for-each loop to show values.

Below is my code fetching $results array from database and showing it in the check box

    <div class="btn-group">
    <button type="button" data-toggle="dropdown" title="Columns">
    Columns
    <b class="caret">
    </b>
   </button>
    <ul class="dropdown-menu">
    <?php  foreach( $results as $result){ 
    ?>
    <li>
    <label class="checkbox">
    <input type="checkbox" id="<?php echo $result['community_name']; ?>" 
    name="multiselect" value="<?php echo $result['community_name']; ?>"><? 
    php echo $result['community_name']; ?></input>
    </label>
    </li>
    <?php } ?>
    </ul>
    </div>   

So how to fetch all the checked and unchecked values in Jquery ??

Please help

Thnks




Aucun commentaire:

Enregistrer un commentaire