title: PHP jQuery and Ajax sending / receiving variables & data
body: <p>So within my jQuery I am making an AJAX call to set a cookie and use the same data to echo the result:</p>
  
  <p><strong>jQuery</strong></p>
  
  <pre><code>jQuery.ajax({
          url: 'script.php',
          data: {status: 'enabled'}
          });
  </code></pre>
  
  <p><strong>PHP</strong></p>
  
  <pre><code>if(!empty($_GET['status'])) {
     $value = $_GET['status'];
     echo $value;
     setcookie("status", $value, time()+3600, "/");
  }
  </code></pre>
  
  <p>The confusing part is that the cookie is being set, however the value is not being echoed, i also tried to print it but doesnt work either.</p>
  
  <p>Ultimately what I wish to do is use the data passed through the ajax call and assign it to a php variable to be used for some conditionals.</p>
  
  <p>Am I missing something? I am learning how to program.</p>
  
  <p><strong>update</strong>
  <img src="https://i.stack.imgur.com/Qb8G5.png" alt="request in network"></p>
  
  <pre><code>Request URL:http://localhost/wp-content/plugins/lu-ban/inc/lu_ban.php?status=enabled
  Request Method:GET
  Status Code:200 OK
  </code></pre>