title: Passing Session Variable with Ajax and iframe does not work
body: <p><strong>I´m trying to pass a variable from a Page (values of a form) to a php page via a session.
  Between that I have an iframe that opens another html page after the form is sent and makes an ajax request to the php page but it always fails and gives me this:</strong></p>
  <blockquote>
  <p>Notice: Undefined index: Flightnumber1</p>
  <p>Notice: Undefined index: Datetime1</p>
  </blockquote>
  <p>The Session does not work.
  If I don´t make an ajax request and just put the php code of my php file inside my iframe-html-page the session works, but I really need it to be an ajax request.</p>
  <p>I tried changing the header as suggested on stackoverflow to:</p>
  <pre><code>header('P3P: CP=&quot;CAO PSA OUR&quot;');
  </code></pre>
  <p>I also checked if thrid party cookies are allowed in my testing browser, even if I don´t see the meaning of that, as it´s a session not a cookie but it was suggestet here too.</p>
  <p>I even tried passing the variable with a session to the iframe-page and then made a new variable out of it and passed that one to the php page, but still no positive result.</p>
  <p>This is the <strong>first page</strong>:</p>
  <pre><code>&lt;?php
      session_start();
      if (isset($_POST['Submit'])) {
          $_SESSION['Flightnumber1'] = $_POST['Flightnumber1'];
          $_SESSION['Datetime1'] = $_POST['Datetime1'];
      }
  ?&gt;
  
  &lt;form target=&quot;iframe&quot; method=&quot;post&quot; action=&quot;iframe.html&quot;&gt;
      &lt;input id=&quot;Flightnumber1&quot; name=&quot;Flightnumber1&quot; type=&quot;text&quot; /&gt;
      &lt;input id=&quot;Datetime1&quot; name=&quot;Datetime1&quot;  type=&quot;text&quot;/&gt;
      &lt;input id=&quot;Submit-Prufbox&quot; name=&quot;Submit&quot; type=&quot;submit&quot; onclick='document.getElementById(&quot;iframe&quot;).src=&quot;iframe.html&quot;; $(&quot;#iframe&quot;).show();' /&gt;
  &lt;/form&gt;
  
  &lt;iframe id=&quot;iframe&quot; name=&quot;iframe&quot; style=&quot;display: none;&quot;&gt;&lt;/iframe&gt;
  </code></pre>
  <p>This is the page that opens in the iframe after the form is submited:
  <strong>iframe.html</strong></p>
  <pre><code>&lt;?php
      session_start();
  ?&gt;
  
  &lt;script&gt;
      $( &quot;#result&quot; ).load( &quot;AjaxRequestPage.php&quot; );
  &lt;/script&gt;
  </code></pre>
  <p>This is the page where the ajax requests:
  <strong>AjaxRequestPage.php</strong></p>
  <pre><code>session_start();
  $regValue = $_POST['Flightnumber1'];
  $regValue2 = $_POST['Datetime1'];
  
  phpcode;
  phpcode;
  phpcode;
  </code></pre>