title: passing and retrieving variables in cakephp from javascript using GET METHOD
body: <p>i know how to construct url parameters in javascript and i know how to extract it if im going to pass it to a php file.</p>
  
  <p>However, here's the scenario, i am going to pass variables from javascript to a function. I have 2 textboxes and i can already get the values of these textboxes and store it to javascript variables:</p>
  
  <pre><code>var fname;
  name = document.getElementById('fname');
  var lname;
  lname=document.getElementById('name');
  </code></pre>
  
  <p>now im stucked up on how i am going to construct it in a way that cakephp post method will be able to understand it. is it just the same with php like the code below?</p>
  
  <pre><code>var vars = "fname="+fname+"&amp;lname="+lname;  
  </code></pre>
  
  <p>here's my code:</p>
  
  <pre><code>if(window.XMLHttpRequest){
              xmlVariable = new XMLHttpRequest();
          }
          else{
              xmlVariable = new ActiveXObject("Microsoft","XMLHTTP");
          }
  
  xmlVariable.open("POST","save",true);
  xmlVariable.send(vars);
  </code></pre>
  
  <p>"save" is actually a function in my cakephp where i wanna process the saving of "fname" and "lname" variables.</p>
  
  <p>i need to do it in cakephp. Would there be any way? </p>