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:
$.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');
}
}
});
var myvar = '<?= $phpvar; ?>';), but not the other way around