title: PHP catalog, click on item image to display product details
body: <p>I am trying to build a simple catalog displaying items from a mysql database.
  So far I can get the items to display in a list format including the images stored as a path in the items table in a field called "path".</p>
  
  <p>I would like the ability to be able to click on the item image and it takes you to a dedicated page showing you the details of that product. The link would correspond to which ever item you click on based on the data in the item table.</p>
  
  <p>So far I have the following code;</p>
  
  <pre><code> &lt;?php
  session_start();
  require "connect.php";
  $date = date("d-M-Y");
  $query =  "select * from item order by date &amp;&amp; time asc limit 0,3";
  $query2 = "select * from users where userid = ".$_SESSION['userid'];
  $result = @mysql_query($query, $connection) 
  or die ("Unable to perform query&lt;br&gt;$query");
   ?&gt;
  
   &lt;?php
    while($row= mysql_fetch_array($result))
    {
    ?&gt;
   &lt;?php echo $row['item'] ?&gt;
   &lt;?php echo $row['description'] ?&gt;
   //Code for Image Link
   &lt;a href='&lt;a href='&lt;?php echo $row['path']?&gt;'&gt;&lt;img src="&lt;?php echo $row['path']?&gt;
   &lt;?php
   }
   ?&gt;
  </code></pre>
  
  <p>The above code allows you to click on the image and it takes me to <a href="http://127.0.0.1/steal/%3Ca%20href=" rel="nofollow">http://127.0.0.1/steal/%3Ca%20href=</a> </p>
  
  <p>However I don't know what I would need to enter in order for it to take me to a page that shows the product? 
  Please Help</p>
  
  <p>Many Thanks</p>