When I select values from two different select I get an error tmp is null
<form method="post" id="filterform">
<select multiple name="category[]" id="category" class="select">
<option value="10">Men Foreigner</option>
<option value="11">Women Foreigner</option>
</select>
<select multiple name="hair[]" id="hair" class="select">
<option value="Black">Black</option>
<option value="Blond">Blond</option>
</select>
</form>
jQuery part
$("select.select").change( function() {
var Thedata = $("#filterform").serialize();
console.log(Thedata);
$.ajax({
data: Thedata,
type: 'POST',
url: 'autocomplete.php?cat=filtermodelscall',
})
.done(function( html ) {
$("tbody").html( html );
});
});
Log shows Thedata values which is category%5B%5D=10&hair%5B%5D=Black
I have no idea where come from this error. Also, when I select values from a single select, it is working.
Thank you for your help