title: how to get script variable in a php variable
body: <p>i am getting value from ajax in a script variable. i want to store it in php variable for further use. here i am getting keyname as a script variable. i want to call it in php variable</p>
  
  <hr>
  
  <pre><code>&lt;script&gt;    
  $(document).ready(function() {
      $("#AttorneyEmpresa").change(function(){
          alert($('#AttorneyEmpresa option:selected').val());
          $.ajax({
              type: 'POST',               
              data:  {keyname:$('#AttorneyEmpresa option:selected').val()}                
          });
      });
  });    
  &lt;/script&gt;
  </code></pre>
  
  <hr>
  
  <pre><code>&lt;select name="data[Attorney][empresa]" id="AttorneyEmpresa"&gt;
  &lt;option value=""&gt;---Select---&lt;/option&gt;    
  &lt;? 
     $sql=mysql_query("select * from master");
     while($sha=mysql_fetch_array($sql)) { ?&gt;
     &lt;option value="&lt;? echo $sha['id']; ?&gt;"&gt;&lt;? echo $sha['name']; ?&gt;&lt;/option&gt;
  &lt;? } ?&gt;
  &lt;/select&gt;
  </code></pre>