Some extra notes: This must be saves with a .php extension, and must run on a PHP enabled website.
Code:
<?php
/* This is a *SAMPLE* of how you
* could creat the code using PHP
* and the URL (the $_GET['']
* var retrives info from the URL).
*
* I don't know how much you know
* about coding, so the code is
* a over-emphasized so you can see
* what's happening. (I have too much
* free time. . . )
*/
if (isset($_GET['image'])){ // If the ?image= is in the URL after the address
$display_image = $_GET['image']; //pull out the path for the image
} else { //if the ?image= is not in the URL after the address
$display_image = 'SOME_IMAGE.JPG'; //default image to display
}
// print out your page:
echo ("
<html>
<head>
</head>
<body>
<!-- Large image //-->
<!-- put the display_image into the img path //-->
<img src='./$display_image' height='300' width='300'><br>
<!-- Thumbnails //-->
<!-- Note that the '?' in the URL marks the start of the query, and the ?image= in the anchor tag is what the if/else if looking for //-->
<a href='www.MYSITE.com/MYPAGE.php?image=IMAGE1.JPG'><img src='./IMAGE1.JPG' height='100' width='100'></a>
<a href='www.MYSITE.com/MYPAGE.php?image=IMAGE2.JPG'><img src='./IMAGE2.JPG' height='100' width='100'></a>
<a href='www.MYSITE.com/MYPAGE.php?image=IMAGE3.JPG'><img src='./IMAGE3.JPG' height='100' width='100'></a>
<!-- Ideally, since you are using the image name twice, you would generate the Thumbnails with JS, but I haven't got time for that. . . //-->
</body>
</html>
");
//Hopefully this will work =)
?>
Bookmarks