Posted By

dsoms on 04/05/11


Tagged

javascript jquery checkbox checked


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

omardixon


Get value of checked checkboxes into a list


 / Published in: jQuery
 

  1. var users = new Array();
  2.  
  3. $("input:checkbox[name=user]:checked").each(function(){
  4. users.push(this.value)
  5. })

Report this snippet  

Comments

RSS Icon Subscribe to comments
Posted By: dsoms on April 6, 2011

$('input[name="mycheckboxes"]:checked').map(function(){ return $(this).val(); }).get().join(",");

then explode in PHP $mycheckboxes = explode(',',$_GET['mycheckboxes']);

You need to login to post a comment.