Now im guessing you have 2 tables.
1 for the reviews
1 for the products
correct? (you should have more then this but this is just for the example)
On page 1 you will be listing all the products:
Page1:
$query = "SELECT * FROM products";
$result = mysql_db_query($database, $query, $connectinfo);
while ($r = mysql_fetch_array($result))
{
$productID = $r["productID"];
$name = $r["name"];
echo"<a href='page2?productID=$productID'>$name</a>";
}
Page2: (listing review headlines for that product)
$query = "SELECT * FROM reviews WHERE productID='$productID'";
$result = mysql_db_query($database, $query, $connectinfo);
while ($r = mysql_fetch_array($result))
{
$reviewID = $r["reviewID"];
$name = $r["name"];
$author = $r["author"];
$date = $r["date"];
echo"<a href='page3?reviewID=$reviewID'>$name</a>";
}
Page3: (page with the FULL review of the product you just selected.)
$query = "SELECT * FROM review WHERE reviewID='$reviewID'";
$result = mysql_db_query($database, $query, $connectinfo);
while ($r = mysql_fetch_array($result))
{
$name = $r["name"];
$author = $r["author"];
$date = $r["date"];
$review = $r["review"];
echo $review;
}
I hope you understand this a bit more.
In summary:
Page 1: Displaying ALL products
Page 2: Displaying ALL headlines for SINGLE product
Page 3: Displaying FULL review for SINGLE Product
Hope this helps some! 🙂
Regards,
Derek