title: react.js using axios to post data to php, but php echo empty
body: <p>I am using react.js, axios, and PHP to post data to MySQL database</p>
  
  <p>This is my react.js code</p>
  
  <pre><code>sendData(){
  var data = new FormData();
  data.append('name', 'jessie');
  data.append('time', '12:00');
  data.append('food', 'milk');
  data.append('nutrition', 'vitaminA');
  axios.post(
  './sendData.php',{
    data: data
  
  })
  .then(response =&gt; {
  console.log(response)
  console.log(response.data)
  this.filter = response.data
  })
  .catch(e =&gt; {
  this.errors.push(e)
  })
  }
  </code></pre>
  
  <p>And this is my PHP code</p>
  
  <pre><code>&lt;?php
  $servername = "127.0.0.1";
  $username = "root";
  $password = "";
  $database = "mydb";
  
  
  $conn = new mysqli($servername, $username, $password, $database);
  
  
  if ($conn-&gt;connect_error) {
  die("Connection failed: " . $conn-&gt;connect_error);
  }
  echo "Connected successfully yayaya";
  echo "the post after this";
  echo json_encode($_POST);
  
  ?&gt;
  </code></pre>
  
  <p>And this is my Chrome Console</p>
  
  <pre><code>Connected successfully yayayathe post after this[]
  </code></pre>
  
  <p>I don't know why my PHP get empty data and echo empty value.</p>