title: Send two variables to php through ajax
body: <p>An easy one I can't find the answer to</p>
  
  <p>Would this be the right way to do it?</p>
  
  <p>Jquery/Javascript </p>
  
  <pre><code>var result = result.text;
  var users = localStorage.getItem('user');
  
  $.ajax({
         url:'******',
         method: 'POST',
         data: {user: users, serial: result},
         dataType: "text",
         contentType: "application/json",
         success: function(data){
  </code></pre>
  
  <p>PHP- :</p>
  
  <pre><code>$u1 = ($_POST['user']);
  $duid = ($_POST['serial']);
  </code></pre>