jquery multiselect form handling

jQuery is not posting my multiselect forms as arrays, it is posting them as the same value definied three times.

For instance...
If I choose the values '1', '2', and '3' from a multiselect "chooseme",
I will get a php environment with chooseme = 3 when I submit the request through jQuery ajax post json.  I use firebug to look at the POST request and I can see it sending "chooseme = 1", "chooseme = 2", and "chooseme = 3".  The thing is I think each time chooseme is being defined in the POST request, it is overwriting the previous value.

However when I send the request as just a standard html request from my browser, it goes into php as an Array.

Can anyone tell me how to get jQuery to submit multiselect form field via AJAX and get an array to arrive at PHP?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

siteup1Author Commented:
FYI this is the relevant jquery code i'm using, paired down for simplicity.  You'll notice i'm using JSON as the transport data type.

Any ideas on why this isn't sending in all values for the multiselect?
  //run ajax
    $.post("step1ajax.php",{products: $("select#products").val(), tag: $("select#tag").val(), ajax: 'true'}, function(j){
      //update the number records div display
      var updaterecordshtml = '<p>There are <strong>' + j.records + ' records</strong> meeting that criteria.</p>';

Open in new window

David S.Commented:
It is sending them. PHP just can't read more than one of them like that. change the name from "chooseme" to "chooseme[]". The square brackets will make PHP treat it like an array which will allow you to access all of the values.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.