Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

send axios request to php

<?php  
  $rp = json_decode(file_get_contents('php://input'), true);
Comment

axios send post to php

var params = new URLSearchParams();
params.append('param1', 'value1');
params.append('param2', 'value2');
axios.post('/foo', params); 
Comment

axios post php

// JS
axios.post(url, JSON.stringify({
name: "this.name",
email: "this.psswrd"
}))
  
// PHP
$_POST = json_decode(array_keys($_POST)[0], true);
Comment

PREVIOUS NEXT
Code Example
Javascript :: how to merge two objects into one in javascript 
Javascript :: es6 node 
Javascript :: poo js 
Javascript :: node js return ID in postgres insert 
Javascript :: how to check input is selected or not 
Javascript :: jquery list all event listeners 
Javascript :: string json to class c# 
Javascript :: get query parameters in node.js 
Javascript :: remove duplicate elements array javascript 
Javascript :: how to export a variable in javascript 
Javascript :: vue js computed 
Javascript :: get first element in json array javascript 
Javascript :: how find empty object in js 
Javascript :: react router dom private route 
Javascript :: force click btn using jquery 
Javascript :: next router 
Javascript :: prettier vscode settings 
Javascript :: js array to csv download 
Javascript :: preview upload image jquery 
Javascript :: javascript set input value 
Javascript :: multiple case switch javascript 
Javascript :: javascript convert a number in string 
Javascript :: quasar change port 
Javascript :: scroll to top 
Javascript :: save image jpg javascript 
Javascript :: selector id jquery but is variable 
Javascript :: mongodb sort 
Javascript :: angular list contains property 
Javascript :: react scroll to bottom 
Javascript :: javascript string normalize method 
ADD CONTENT
Topic
Content
Source link
Name
9+1 =