How would I get the same functionality of this form
Code:
<form action="Pronunciation.php" method="POST">
<div><label><input type="checkbox" name="category[]" value="Medications" />Medications</label></div>
<div><label><input type="checkbox" name="category[]" value="Terminology" />Terminology</label></div>
<div><input type="text" name="t" />Search Text</div>
<input type="submit" value="submit" />
</form>
using ajax.
How would I write the post string in such a way that I can get an category array post to the php file.
I have
Code:
for(var i = 0; i < this.category.length; i++){
postStr += '&category%5B%5D=' + this.category[i];
}
so the post string ends up like.
?category%5B%5D=Terminology&category%5B%5D=Medications
but in the php file it says that category is not set.
Any ideas or alternatives to getting the array of categories to my php file using ajax?
Thanks,
Michael