title: How to send multiple data fields via Ajax?
body: <p>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.</p>
  
  <pre><code>$(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) {...
  </code></pre>
  
  <p>I've tried all sorts of stuff:</p>
  
  <pre><code>data: {status: status, name: name},
  </code></pre>
  
  <p>Or even stuff like this just for testing purposes:</p>
  
  <pre><code>data: "status=testing&amp;name=ronny",
  </code></pre>
  
  <p>But whatever I try, I get nothing in my <code>activity_save.php</code> thus nothing in my SQL.</p>
  
  <p>So, what's the correct syntax to put more lines of data in my AJAX call?</p>