carry a link to next page
Posted: Wed Feb 04, 2004 10:40 am
I have a page which generates results from a search. I have put a link to a form on the image in the result which I want to link to another page which holds more information about the product.
I don't want to create hundreds of pages so will generate the page in php. how can I carry across the id number of the of the image of the one clicked on so that my next query uses that refernece to generate the page. my code at present is
code:
while ($row = mysql_fetch_array($resultID, MYSQL_ASSOC))
{
$style = $row['StyleID'];
$test = "gifs/".$row['StyleID'].".jpg";
print "<tr>";
//print "<td><img src='$test'></td>";
print "<td><a href = 'search.php'><img src='$test'></a></td>";
print "<td>".$row['StyleID']."</td>";
print "<td>".$row['ProductGroupName']."</td>";
print "<td>".$row['Gender']."</td>";
print "<td>".$row['SubBrand']."</td>";
print "<td>".$row['Colour']."</td>";
print "</tr>";
print "<tr>";
print "<td>";
$resultID1= mysql_query("SELECT * FROM tblFeatureDetails WHERE SytleID LIKE '$style'", $linkID) or die(mysql_error());
while ($row2 = mysql_fetch_row($resultID1, MYSQL_ASSOC))
{
$feature = "gifs/F".$row2['FeatureID'].".png";
print "<img src='$feature'>";
}
}
print"</table>";
end code:
I don't want to create hundreds of pages so will generate the page in php. how can I carry across the id number of the of the image of the one clicked on so that my next query uses that refernece to generate the page. my code at present is
code:
while ($row = mysql_fetch_array($resultID, MYSQL_ASSOC))
{
$style = $row['StyleID'];
$test = "gifs/".$row['StyleID'].".jpg";
print "<tr>";
//print "<td><img src='$test'></td>";
print "<td><a href = 'search.php'><img src='$test'></a></td>";
print "<td>".$row['StyleID']."</td>";
print "<td>".$row['ProductGroupName']."</td>";
print "<td>".$row['Gender']."</td>";
print "<td>".$row['SubBrand']."</td>";
print "<td>".$row['Colour']."</td>";
print "</tr>";
print "<tr>";
print "<td>";
$resultID1= mysql_query("SELECT * FROM tblFeatureDetails WHERE SytleID LIKE '$style'", $linkID) or die(mysql_error());
while ($row2 = mysql_fetch_row($resultID1, MYSQL_ASSOC))
{
$feature = "gifs/F".$row2['FeatureID'].".png";
print "<img src='$feature'>";
}
}
print"</table>";
end code: