Im doing standard image gallery, once in selected category, browser is printing out all thumbs and links to their bigger version. (by id of record) - i manage to display a big version.
but i dont know how to do links to next and prev id in selected category.
so i have following queries:
1 - is displaing big image.
Code: Select all
$result=mysql_query("SELECT * FROM morgal WHERE categ='$categ' AND id='$id' LIMIT 1") or die(mysql_error());
while($row=mysql_fetch_array($result))
{
echo "<img src='http://www.nita-on-line.com/morgal/photos/";
echo $row['image'];
echo ".jpg' border='0'>";
}Code: Select all
$res1=mysql_query("SELECT * FROM morgal WHERE cat='$categ' ORDER BY id") or die(mysql_error());i was traying to count records, and then display links to prev next image but this method is not covering with the id of record so wrong images are being displayed. (standad paging result).
to check the script out go to:
http://www.nita-on-line.com/morgal
Im relly stuck on this and would like to move on with it, if some one can give me some idea how to get these links right.
Thanka a lot for your help!!
Nita