title: How to assign javascript value to php variable without using cookie
body: <p>I am recieving data form controller in ajax. Then I should assign it to php variable but without using cookies. How to do it?
  My code:</p>
  
  <pre><code>$.ajax({
          url: '/controller/action',
          type: 'post',
          data: {
              id: id,
          },
          success: function(data){
              if (data) {
                  //here I should assign data to php variable
              }
              if (!data) {
                  console.log('no data');
              }
          }
  
       });
  </code></pre>