I have the following code that builds a query string:
var name = $(this).next()[0].name;
var value = $(this).next()[0].checked;
var str = name+'&value='+value;
and outputs an array on my server like this:
[value] => false
What I would like to have is something more like this:
array(
[myInputName] => value
)
How can I achieve this?
'&value'to'&myInputName'var str = name + '=' + value?