0

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

1 Answer 1

4

Replace with:

$.post(

'ajax_Save.php',
{
id: $('#service_id').val(),
number: $('#number').val()
},
    function(data){
...
});
Sign up to request clarification or add additional context in comments.

1 Comment

So stupid of me. I have all my code full with this brackets. Thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.