title: session based shopping cart
body: <p>Originally I got it to work fine, in passing the product <code>id</code> over, through the <code>array_push()</code> function, going from  <code>addtocart.php</code> to  <code>Shoppingcart.php</code> displaying the items. But when I add more variables/into the <code>array_push()</code> function, other that the single  product <code>id</code> <code>$_GET['id']</code>, ... on the next page that receives this array, it gives me an error.</p>
  
  <p><strong>The problem is:</strong>
  In the original  <code>$sql</code> query it was getting the <code>id</code> it needs to display the products info from the <code>array_push()</code> and display it on to  <code>Shoppingcart.php</code>, but when I add more variables/info into the <code>push_array()</code> I get an error. Because its confuses the <code>$sql</code> query, because of the <code>WHERE id IN</code> clause … the <code>ID</code> is still in there, now along with the other info(<code>$_GET['size']</code> &amp; <code>$_GET['qty']</code>), I just don’t know how to access it...</p>
  
  <p>How can I add more info into the push array, but some how define it so I can grab the <code>id</code> for my <code>$sql</code> query, to get the product info, but also have access to the <code>size</code> &amp; <code>Qty</code> for my <code>while()</code> loop. </p>
  
  <p><strong>addtocart.php</strong></p>
  
  <pre><code>array_push($_SESSION['cart'], $_GET['id']); //working MAIN
  header('Location:shoppingCart.php');
  
  How 2: array_push($_SESSION['cart'], $_GET['id'], $_GET['size'],  $_GET['qty']); 
  //Not Working
  </code></pre>
  
  <p><strong>shoppingcart.php</strong></p>
  
  <pre><code>    &lt;?php 
      $whereIn = implode(',', $_SESSION['cart']); //working MAIN
      $sql = " SELECT * FROM inventory WHERE id IN ($whereIn) "; ?&gt;
  
   &lt;?php while($row = mysql_fetch_array($result)) { ?&gt;
  
  &lt;td  valign="top"&gt;
      &lt;div id="sc_itemBox"&gt;
          &lt;p class="sc_itemBox_iTEXT"&gt;&lt;strong&gt;SIZE:&lt;/strong&gt; “”XL?? &lt;em&gt;(Extra Large??)&lt;/em&gt;&lt;/p&gt;
          &lt;div id="sc_itemBox_img"&gt;&lt;img src="&lt;?php echo $row['imgThumb'];?&gt;" /&gt;&lt;/div&gt;
          &lt;p class=&lt;p class="sc_itemBox_iTEXT"&gt;&lt;strong&gt;STYLE#&lt;/strong&gt;&lt;?php echo $row['styleNUM']; ?&gt; &lt;/p&gt;
      &lt;/div&gt;        
  &lt;/td&gt;
  &lt;?php } ?&gt;
  </code></pre>