Forum Moderators: open
An easy way is to use a query string:
<a href="yoursite.com.php?id=1">Click for Big Picture</a>
If you are using a database, you could query the database based on the id. Or an alternative is to use the image name in the link:
<a href="yoursite.com.php?id=picture.jpg">Click for Big Picture</a>
Again, use the value of id to get your big picture.
if (isset($_GET['id']))
{
$id = $_GET['id'];
echo "<img src=\"" . $id . "\" border=\"0\">\n";
}
Hope that helps. :)