title: Loosing posted data when redirecting - php
body: <p>I don't where I am going wrong. I am sending from the homepage data via an ajax request to somepage.php. Under some conditions, somepage.php redirects the user to someotherpage.php that display the user page. The redirection is made by a header('location :'. $url), (so $url processes someotherpage.php) The problem is that the redirection looses the data that are posted from the initial ajax request. So I choose to tredirect the user via : </p>
  
  <pre><code>$data = $_POST['data'];
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
  curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
  $response = curl_exec($ch);
  curl_close($ch);
  exit;
  </code></pre>
  
  <p>The problem is that I have no post data anymore when hitting someotherpage.php. Someone could help ?</p>