title: Using URL parameters in MYSQL search
body: <p>I am trying to built a search page for products in which i have two table products and inventory, i have my product details in product and inventory details like color,size,price etc in inventory. Please suggest a solution i am really stuck and i need a better solution for a powerful design. Below are all necessary details:</p>
  
  <p><strong>Product:</strong></p>
  
  <pre><code>product_id
  product_name
  product_sku
  product_desc
  product_category
  </code></pre>
  
  <p><strong>Inventory:</strong></p>
  
  <pre><code>inventory_id
  product_id
  inventory_color
  inventory_size
  </code></pre>
  
  <p><strong>MY QUERY:</strong></p>
  
  <pre><code>SELECT p.product_name, p.product_sku, p.product_desc, i.inventory_color, i.inventory_color
  FROM products as p
  INNER JOIN  invetory as i ON p.product_id = i.product_id
  </code></pre>
  
  <p><strong>URL:</strong></p>
  
  <pre><code>www.abc.com/index.php?cat=shoe&amp;color=black
  </code></pre>
  
  <p>How can i get the cat and color from URL and use them in my query? Or am i doing the right way?</p>