Question and answer is powered by AnsPress.io
var your_data = "Your variable"; $ajax({ url : "Your php page url", //In which page you want to send the variable type : "POST", data : {'data_key':your_data}, success : function(res){ console.log(res); } })