php passing variables axios
$_POST = json_decode(file_get_contents("php://input"),true);
echo $_POST['data1'];
4.4
5
axios.post(url, {data1: 'string' }).then(function(response) {
//code here
});
Thank you!
5
0
4.5
2
var params = {
data1: 'string',
}
axios.post(url, params).then(function(response) {
//code here
});
Thank you!
2
0
Are there any code examples left?
New code examples in category PHP