title: passing values into a lightbox
body: <p>I need help passing values into a lightbox to displays shopping cart information.</p>
  
  <p>Currently i have a simple setup just displaying a static sentence.</p>
  
  <p><strong>Javascript Code:</strong></p>
  
  <pre><code>function displayHideBox(boxNumber) 
  { 
      if(document.getElementById("LightBox"+boxNumber).style.display=="none") {
          document.getElementById("LightBox"+boxNumber).style.display="block";
          document.getElementById("grayBG").style.display="block"; 
      } else { 
          document.getElementById("LightBox"+boxNumber).style.display="none";
          document.getElementById("grayBG").style.display="none"; 
      } 
  } 
  </code></pre>
  
  <p><strong>HTML code:</strong></p>
  
  <pre><code>&lt;a href="&lt;?$_SERVER['PHP_SELF']?&gt;?action=add&amp;id=&lt;?=$id;?&gt;" onclick="displayHideBox('1'); return false;"&gt;Open Box&lt;/a&gt;
  
  &lt;div id="grayBG" class="grayBox" style="display:none;"&gt;&lt;/div&gt; 
  &lt;div id="LightBox1" class="box_content" style="display:none;"&gt; 
  &lt;table cellpadding="3" cellspacing="0" border="0"&gt; 
    &lt;tr align="left"&gt; 
      &lt;td colspan="2" bgcolor="#FFFFFF" style="padding:10px;"&gt;&lt;div onclick="displayHideBox('1'); return false;" style="cursor:pointer;" align="right"&gt;X&lt;/div&gt;&lt;p&gt;&lt;!-- Box content --&gt;Text of the box!!!&lt;/p&gt;&lt;/td&gt; 
    &lt;/tr&gt; 
  &lt;/table&gt; 
  &lt;/div&gt; 
  </code></pre>
  
  <p>i have set up a simple shopping cart and currently when you add a product it goes to the shopping cart page where it creates a session and displays your items in your cart with options to remove or continue shopping. But when you add an item to your cart i need it to display a light box showing that items info and other items in shopping cart.</p>
  
  <p><strong>here is the code currently for the "add to cart" feature:</strong></p>
  
  <pre><code>&lt;table border="1"&gt;
  
      &lt;?php
          //Select all of the relevant part details
          $prod_query = 'SELECT * FROM *****.*****';
          $prod_details = db_query_into_array_enhanced($mysql_connection, $prod_query);                       
          $count = count($prod_details);
          for($i = 0; $i &lt; $count; $i++) 
              {?&gt;         
               &lt;tr&gt;
                  &lt;? $id = $prod_details[$i]['catID'];?&gt;
                   &lt;td&gt;&lt;?=$prod_details[$i]['catID'];?&gt;&lt;/td&gt;
                   &lt;td&gt;&lt;?=$prod_details[$i]['shortDescription'];?&gt;&lt;/td&gt;
                   &lt;td&gt;&lt;?=$prod_details[$i]['rrp'];?&gt;&lt;/td&gt;
                   &lt;td&gt;&lt;a href="cart.php?action=add&amp;id=&lt;?=$id;?&gt;"&gt;Add To Cart&lt;/a&gt;&lt;/td&gt;
  
               &lt;/tr&gt;
          &lt;?}?&gt;
  &lt;/table&gt;
  
  
  &lt;a href="cart.php"&gt;View Cart&lt;/a&gt;
  </code></pre>
  
  <p>So really I think my question is how do i get this dynamic data into my lightbox?</p>
  
  <p>i hope i have explained this well enough and that someone can help me...thanks in advance</p>