php passing variable axios
$_POST = json_decode(file_get_contents("php://input"),true);
echo $_POST['data1'];
Hurt Hamster
$_POST = json_decode(file_get_contents("php://input"),true);
echo $_POST['data1'];
var params = {
data1: 'string',
}
axios.post(url, params).then(function(response) {
//code here
});
axios.post(url, {data1: 'string' }).then(function(response) {
//code here
});