title: $.ajax() jquery how to send multiple data values
body: <p>This is an update of my code. Now I get the values in my update statement, but I still get a parse error. Maybe It has something to do with var update variabele.</p>
  
  <pre><code>    $("#submit_tosolve").on("click",function(e) 
  {
  alert("ok");
  
  $.valHooks.textarea = {
    get: function( elem ) {
      return elem.value.replace( /\r?\n/g, "\r\n" );
    }
  };
  
  // DATA UITLEZEN UIT TEXTAREA
  var message =$("#bugcommentaar").val();  //OK
  //var solved_ajax=$('input:radio[status3]:checked').val(); //OK DIT NOG IN DATATYPE STEKEN data:
  console.log(message);
  
  var request = $.ajax({
    url: "ajax/facebook_ajax.php",
    type: "POST",
    data: {message : message}, //JSON
    dataType: "json"
  });
  
  request.done(function(msg) {
  if(msg.status=="success"){
  
  
    var update='&lt;div style="display:none;" class="span4"&gt;'+
    ' &lt;tr&gt;'+'&lt;td&gt;'+'&lt;TEXTAREA class="bugcommentaar"&gt;'
    '&lt;p&gt;'+message+' &lt;span&gt; comment posted &lt;/span&gt;&lt;/p&gt;&lt;/TEXTAREA&gt;&lt;/tr&gt;&lt;/td&gt;&lt;/div&gt;';
  
  $("#comments tr").prepend(update);
  $("#comments tr td").first().slideDown(); //dit gaat werken op elke browser, de eerste eruit halen
  
    }
  });
  
  request.fail(function(jqXHR, textStatus) {
    console.log("request failed" +textStatus);
  });
  
  //HOU SUBMI TEGEN
  e.preventDefault();
  
  
  });
  </code></pre>
  
  <p>here is my ajax code: In this code I wan't to update the var message. But I can't do that because I also need var message2 for my id.</p>
  
  <pre><code> &lt;?php
      session_start();
      include_once("../classes/Bug.class.php");
  
  
          if(isset($_POST['message'])) // komt van app.js
          {
              try
              {
                  $Bug = new Bug();
                  $Bug-&gt;Commentaar=$_POST['message'];
                  $Bug-&gt;Bug_id=$_SESSION["id2sessioncommentaar"];
                  $Bug-&gt;UpdateCommentaar();   
                  $feedback['text'] = "Your comment has been posted!";
                  $feedback['status'] = "success";
              }
              catch(Exception $e)
              {
                  $feedback['text'] = $e-&gt;getMessage();
                  $feedback['status'] = "error";
              }
  
              header('Content-Type: application/json' );
              echo json_encode($feedback);
  
          }
  
  
  ?&gt;
  </code></pre>