title: Request quote form in popup on php page
body: <p>I have a popup Getquote form. Which pops up on clicking 'Get quote' button shown under each product on the php webpage. The Get quote button is within php 'while' loop of 'mysql_fetch_array' function to show products from database.</p>
  
  <pre><code>&lt;!--Fetching product from database &amp; Getquote button--&gt;
  
  &lt;?php
  $sno = 1;
  while ($row = mysql_fetch_array ($result))
  {
  echo $row [3]; 
    $product_name =$row [3]; 
  ?&gt;
      &lt;a href = "javascript:void(0)" onclick ="document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'"&gt;
        &lt;input type="button" value="Get Quote" id="button-quote"  /&gt;&lt;/a&gt;
  &lt;?php
  $sno++;
  }
   ?&gt;
  </code></pre>
  
  <p>On clicking 'Get Quote' button, the product name is also shown on the popup form, but the problem is its showing the last listed product for all other products. </p>
  
  <pre><code>&lt;!--CSS of popup box--&gt;
      &lt;style&gt;
      .black_overlay{
          display: none;
          position:fixed;
          top: 0%;
          left: 0%;
          width: 100%;
          height: 200%;
          background-color: black;
          z-index:1001;
          -moz-opacity: 0.8;
          opacity:.80;
          filter: alpha(opacity=80);
      }
      .white_content {
          display: none;
          position: fixed;
          top: 25%;
          left: 25%;
          width: 50%;
          height: 50%;
          padding: 16px;
          border: 10px solid #0288BE;
          background-color: white;
          z-index:1002;
          overflow: auto;
      }
      a:link {text-decoration:none;}
  &lt;/style&gt;
  
   &lt;!--Request Quote in Popup code--&gt;
  
   &lt;div id="fade" class="black_overlay"&gt;&lt;/div&gt;
     &lt;div id="light" class="white_content"&gt;
  &lt;div id="response"&gt;&lt;/div&gt;
  &lt;table align="right"&gt;
  &lt;tr&gt;
  &lt;td align="right"&gt; &lt;a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'"&gt;Close&lt;/a&gt;  
  
   &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt; 
            &lt;form action="phpform.php" method="post" enctype="multipart/form-data" onsubmit="return validate()" name="quoteForm"&gt;
  &lt;h2&gt;Request A Quote &lt;/h2&gt;
  &lt;br/&gt;
  
  &lt;table cellpadding="3"&gt;
  &lt;tr&gt;
  &lt;td&gt;Product Name&lt;/td&gt;
  &lt;td&gt;&lt;b&gt;&lt;?php echo $product_name; ?&gt;&lt;/b&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td&gt;Quantity&lt;/td&gt;
  &lt;td&gt;&lt;input type="text" name="quantity" size="2" value="" /&gt;&lt;/td&gt;
  &lt;/tr&gt;
  &lt;tr&gt;
  &lt;td colspan="2"&gt;&lt;input type="submit" name="submit"  value="Get A Quote" /&gt;&lt;/td&gt;
  &lt;/tr&gt; &lt;/table&gt; 
  &lt;/form&gt;        
  &lt;/div&gt;
  </code></pre>
  
  <p>To understand the problem see working example <a href="http://myweblo.com/imc/index.php?mod=products&amp;category=Flame%20Spray%20Gun" rel="nofollow">Click here</a></p>
  
  <p>Its showing product 'Gun IMC-5K' in popup even on clicking on Getquote button on other products.
  How to get different product name in the Getquote form for each product.</p>
  
  <p>Any help would be appreciated.</p>