Hey, I'm new to php and have been trying to do this very simple thing but am having no luck.
All I want is when I click on a link to open an image, rather than just opening the image in a browser, I want to display it within a new webpage in say a div for example.
This is what I have so far, it basically loads images from a thumbnail directory, and contains a link to display the related photo image.
CODE
<?php
function PhotoGallery()
{
$thumbnails = glob("images/thumbnails/*.*");
$photos = glob("images/photos/*.*");
$j = 0;
foreach($thumbnails as $thumbnail)
{
echo "<div id = \"thumbnail\">";
$i++;
echo "<a href=\"" . $photos[$j] . "\" target=\"_self\">";
echo "<img src=\"" . $thumbnail . "\" alt = \"\" title = \"\">";
echo "</a>";
echo "</div>";
$j++;
if($i >= 5)
{
echo "<br />";
$i = 0;
}
}
}
?>
All I need is to make the links to pass the path to the photo to another web page to display it there.
Thanks!