Skip to content
Advertisement

How to send multiple data fields via Ajax? [closed]

I’m stuck: I’m trying to submit a form using AJAX, but I can’t find a way to send multiple data fields via my AJAX call.

I’ve tried all sorts of stuff:

Or even stuff like this just for testing purposes:

But whatever I try, I get nothing in my activity_save.php thus nothing in my SQL.

So, what’s the correct syntax to put more lines of data in my AJAX call?

Advertisement

Answer

The correct syntax is:

As specified here: http://api.jquery.com/jQuery.ajax/

So if that doesn’t work, I would alert those variables to make sure they have values.

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement