Guest User

Untitled

a guest
Apr 25th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. <table class="table table-bordered table-hover table-responsive">
  2. <?php foreach($fetch2 as $l2){?>
  3.  
  4. <tr id="<?php echo $l2['cid'] ?>">
  5. <td><?php echo $l2['cname'] ?></td><td><input type="number" class="form-control" name="<?php echo $l2['cid'] ?>" id="<?php echo $l2['cid'] ?>" value="" /></td>
  6. </tr>
  7. <?php }?>
  8. </table>
  9.  
  10. for (int i=0; i<=33; i++) //because all inputs have id as numbers
  11. {
  12. var id = $("#"+i).attr('id') //to get the id of all inputs
  13. var idValue = $("#"+i).val();
  14.  
  15. //Send these value to php to update the database.
  16. //Ajax...
  17.  
  18. }
Add Comment
Please, Sign In to add comment