I'm stuck: I'm trying to submit a form using AJAX, but cannot find a way to submit multiple data fields through my AJAX call.
$(document).ready(function() { $("#btnSubmit").click(function() { var status = $("#activitymessage").val(); var name = "Ronny"; $.ajax({ type: "POST", url: "ajax/activity_save.php", **data: "status="+status+"name="+name"**, success: function(msg) {...
I tried all kinds of things:
data: {status: status, name: name},
Or even things like this for testing:
data: "status=testing&name=ronny",
But no matter what I tried, I got nothing in my activity_save.php , nothing in my SQL.
So what is the correct syntax for placing more lines in my AJAX call?
jquery sql ajax
deadconversations May 22 '11 at 2:25 2011-05-22 02:25
source share