title: Get id using query
body: <p>I'm creating an eCommerce website, I'm  trying to add option, where the buyer select a item size through a drop-down list, then it pass variables to jquery then jquery pass it to php, and if the item size is available in stock it's display an Add to cart button, otherwise a out of stock button. I manage to get it working till the point where it passes the item size to php, But I don't know how to pass the product id, which is needed to check the database.</p>
  
  <p>the size select:</p>
  
  <pre><code>&lt;form id="form1" name="form1" method="post" action="cart.php"&gt;
      &lt;label&gt;Size:&lt;/label&gt;
      &lt;select name="search" class="search" id="searchbox"&gt;
      &lt;option value="XS"&gt;XS&lt;/option&gt;
      &lt;option value="S"&gt;S&lt;/option&gt;
      &lt;option value="M"&gt;M&lt;/option&gt;
      &lt;option value="L"&gt;L&lt;/option&gt;
      &lt;option value="XL"&gt;XL&lt;/option&gt;
      &lt;option value="XXL"&gt;XXL&lt;/option&gt;
      &lt;option value="3XL"&gt;3XL&lt;/option&gt;
      &lt;option value="4XL"&gt;4XL&lt;/option&gt;
      &lt;option value="5XL"&gt;5XL&lt;/option&gt;
      &lt;/select&gt;
      &lt;input type="hidden" name="product_id" id="product_id" value="'.$pid.'" /&gt;
      &lt;/form&gt;
      &lt;div id="display"&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p>my query code:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(document).ready(function(){
  $(".search").change(function() 
  {
  var searchbox = $(this).val();
  var dataString = 'searchword='+ searchbox;
  if(searchbox=='')
  {}
  else
  {
  $.ajax({
  type: "POST",
  url: "check_stock.php",
  data: dataString,
  cache: false,
  success: function(html)
  {
  $("#display").html(html).show();
  }
  });
  }return false; 
  });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Any help appreciated</p>
  
  <p>example of what I got so far
  <a href="http://mysandbow.webatu.com/view_product?product=2" rel="nofollow">http://mysandbow.webatu.com/view_product?product=2</a> </p>