title: ajax is not fetching session
body: <p>I have sending an ajax request but the session is not working there Here is my jquery code</p>
  
  <pre class="lang-js prettyprint-override"><code>$.ajax({
    url: 'practice3.php',
    type: 'GET',
    data: {id: ids},
    success: function (response) {
      if (response == 1) {
        //$('.cart-items').html(response);
        alert('Add');
      } else if (respone == 0) {
        location.replace('loginregister.php');
      }
    },
  });
  </code></pre>
  
  <p>Dont Get confused with id this is the data i was sending in ajax but first i wanted to check is session is working or not but didnt response anything and yes xhr status is 200 and here is my ajax code</p>
  
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  ob_start();
  session_start();
  if (isset($_SESSION['email'])) {
      echo 1;
  } else {
      echo 0;
  } 
  ?&gt;
  </code></pre>
  
  <p>Please anyone help me out</p>