title: Can't send POST values outside of Wordpress from Contact Form 7 Form
body: <p>my objective is to submit values via POST of a contact form 7 to a redirected outside php page and echo those values.</p>
  
  <p>The issue is when the page is redirected after the submission, the values seem to be lost unless i remove the JS and change the action Url of the form ending up removing all the contact form 7 features which i require (validation, email sent, etc..).</p>
  
  <p>I tried multiple plugins such as contact form 7 to API and it only works via GET method which i don't want. I tried to get the posted values and transforming them into session but it's not working because i'm probably doing something wrong.</p>
  
  <p>Here's the form:
  <a href="https://i.stack.imgur.com/OANRQ.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Here's the result that is supose to be shown:
  <a href="https://i.stack.imgur.com/jMkjQ.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>Ok so i posted the function to fetch the posted data and the var_dump missing on the result php file.</p>
  
  <p>Here's the fucntions.php</p>
  
  <pre><code>add_action( 'wpcf7_before_send_mail', 'send_post_values' );
  
  
    if ($form_id == 7627) {
  
      $user      = $cf7-&gt;posted_data["user"];
      $email = $cf7-&gt;posted_data["email"];
      $country  = $cf7-&gt;posted_data["country"];
  
      //any code missing??
  
    }
  
  }
  </code></pre>
  
  <p>Here's the show-values.php</p>
  
  <pre><code>&lt;?php
  var_dump($_POST);
  print_r($_POST);
  echo "Name: " . $_POST["user"] . "&lt;br&gt;"; 
  echo "Email: " . $_POST["email"] . "&lt;br&gt;";
  echo "Country: " . $_POST["country"] . "&lt;br&gt;";
  ?&gt;
  </code></pre>
  
  <p>And here's the JS i put on the edit page of wordpress for redirection</p>
  
  <pre><code>document.addEventListener( 'wpcf7mailsent', function( event ) {
      location = 'https://www.xxxxx.xxx/forms/show-values.php';
  }, false );
  </code></pre>
  
  <p>The output is still missing:
  <a href="https://i.stack.imgur.com/N7lAW.jpg" rel="nofollow noreferrer">enter image description here</a></p>
  
  <p>Not using any extra plugin besides cf7 at the moment.</p>