title: Passing sessions variables through an iframe, php
body: <p>First timer to the site, not an overly experienced php programmer here :)</p>
  
  <p>I have a problem, i am using an iframe within a site which im attempting to use a session variable inside, firstly ive just been trying to display the session variable to make sure they are accessible from within the iframe:</p>
  
  <pre>
      echo "session of productcheck ".$_SESSION['productcheck']." <br>";
      echo "session of productcheck1 ".$_SESSION['productcheck1']." <br>";
      echo "session of productcheck2 ".$_SESSION['productcheck2']." <br>";
      echo "session of productcheck3 ".$_SESSION['productcheck3']." <br>";
  </pre>
  
  <p>this just shows "session of product check" with nothing after each one, I set the session variable as such:</p>
  
  <pre><code>$_SESSION['productcheck'] = $productBox;
  </code></pre>
  
  <p>the $productBox is a GET from the URL:</p>
  
  <pre>
  echo " &lt;iframe src=\"homeview.php?productBox=$product1\" name=\"FRAMENAME\" width=\"594\" height=\"450\" scrolling=\"No\" id=\"FRAMENAME\" allowautotransparency=\"true\" &gt; &lt;/iframe &gt;"; </pre>
  
  <p>What's strange is if i just take the $productBox variable retrieved from the URL and use that then the code works, its only when i store it in a session variable that it gets confused. I want to retrieve a second $productBox and assign it to session var productcheck1 and so forth down the line. Unfortunately, i have to take one var in at a time, otherwise i could just pass all 4 products and not worry about the sessions.</p>
  
  <p>Perhaps I'm making this far too complicated, any help would be much appreciated Thank you!!</p>