Learning php and need advice on how to create a simple image display of only the image(similar to http://www.sweetconcrete.com/CounterTopSamples/pages/p74_jpg.htm style), starting at P71 and being able to go through all the pics from 71-76 through next and previous links, but not sure how to go about it... Also looking at making it so if it is beginning image, there will be no previous link, and vice-versa for last. Looked for so many solutions, but all more complex than what I want and can't help.
Here's what I've got...
defs.php
<?php
$jpgdir = "pics/jpgpics/";
$descdir ="descriptions/txt/";
$self = $_SERVER['PHP_SELF'];
?>
file 2
<?php
require("defs.php");
$id = 71;
$last = 76;
$first = 71;
$file = "../../pics/jpgpics/P71.JPG";
$caption = "No description";
echo "<html><head>";
echo "<title>My Gallery</title>";
echo "</head><body>";
echo "<h1>Gallery 09</h1>";
echo "<p><img src=\"$file\"></p>";
echo "<a href=\"\">PREVIOUS </a>";
echo "<a href=\"$self?id=$id\">NEXT</a>";
echo "</body></html>";
?>
Any help/advice always appreciated