title: How to retrieve variables in php sent by axios post request
body: <p>I want to send a POST request to a PHP script. I am using Axios:</p>
  
  <pre><code>axios.post('inc/vote.php', {
      id: this.selected,
  }) .then(function (response) {
      console.log(response);
  });
  </code></pre>
  
  <p>In the PHP file I am trying something like this to retrieve that id variable from axios:</p>
  
  <pre><code>$id = $_POST['id'];
  </code></pre>
  
  <p>But seems it is not doing anything. </p>
  
  <p>What is the correct way to retrieve variables from the request?</p>