jQuery Ajax posting Arrays instead of simple data
- by Ignacio
Hey, I've tried to update jQuery to its latest version on a system I'm working and I'm having this issue:
I have a file that posts data to a .php:
$.post(
'ajax_Save.php',
{
id: [$('#service_id').val()],
number: [$('#number').val()]
},
function(data){
...
});
On ajax_Save.php var_dump($_POST) gives:
array(26) { ["id"]=> array(1) { [0]=> string(5) "18204" } ["number"]=> array(1) { [0]=> string(5) "18250" }...
With jQuery version 1.2.2 the result is:
array(26) { ["id"]=> string(5) "18204" ["order_number"]=> string(5) "18250"
Which is OK.
Any clues? Thx