I have a photo gallery script that when you click on a thumbnail it goes to a PHP or HTML Page that displays the photo in a larger version there is only one problem I am having with that I can't do a write up of each photo because all the photos are on the same page this is for an art site I would like to be able to sell the print and I need a write up specific to that photo can anyone help to make it so when you click on a thumbnail it goes to a seperate page this is the code for the gallery
Code: Select all
<?php
$a = 0;
$new_tr = 0;
$filepath = "thumbnails";
$url_path = "images2";
$dir = dir($filepath);
$start=0;
$stop=22;
if(!empty($_GETї'start']) && !empty($_GETї'stop'])) {
$start=intval($_GETї'start']);
$stop=intval($_GETї'stop']);
}
echo "<table width="450" border="0" cellpadding="5" cellspacing="5">";
while($entry=$dir->read()) {
if($a>=$start && $a<$stop) { // $a<$stop because from 0-19 you have 20 pictures
if($entry != "." && $entry != "..") {
if (!($new_tr%5)) {echo "<tr>";}
?>
<td align="center" valign="top">
<a href="waterpics.php?image=<?php echo urlencode($entry); ?>">
<img src="<?php echo "$filepath/$entry"; ?>" alt="<?php echo $entry; ?>" border="1" class="imgborder"></a>
</td>
<?php
$new_tr++;
if (!($new_tr%5) && $new_tr!=0) { echo "</tr>"; }
} // end of if($entry
} // end of if($new_tr>=
$a++;
} // end of while
?>
</tr><td width="450" align="center">
</table>
<?php
if($start>=20) {
$start2=$start-20;
echo "<a href="".$PHP_SELF."?start=".$start2."&stop=".$start."">previous | </a>";
}
echo " ";
$stop2=$stop+20;
echo "<a href="".$PHP_SELF."?start=".$stop."&stop=".$stop2.""> next </a>";
?>and this is the code that displays the image on a new page
Code: Select all
<?php
$url_path = "images2";
?>
<div align="center">
<img src="<?php echo "$url_path/" . $_GETї'image']; ?>" border="1" class="imgborder"><br>
<br>
<a href="javascript: history.back()">Back to where you where last</a>
</div>Thanks to all those wonderfull PHP programmers who have helped me so far