Skip to content

Instantly share code, notes, and snippets.

@harisrozak
Created November 17, 2016 12:50
Show Gist options
  • Save harisrozak/348f4d9722ef51b1420cb3026e064c1f to your computer and use it in GitHub Desktop.
Save harisrozak/348f4d9722ef51b1420cb3026e064c1f to your computer and use it in GitHub Desktop.
Array input html from ajax to php
var user_name = [];
$bulk_row.find('input[name="user_name[]"]:checked').each(function(index, elem) {
user_name.push(elem.value);
});
var data = {
action: 'ajax_form',
user_name: user_name
}
$.post(ajaxurl, data, function(response){
$('#response_output').html(response);
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment