hello,
i have table - pictures:
id | filename | galleryname
example values:
1 | xxx.jpg | xxx
2 | wer.jpg | showroom
3 | sas.jpg | showroom
4 | aas.jpg | showroom
5 | aaa.jpg | swat
6 | abc.jpg | showroom
what i need to do is:
select all pictures which is in gallery required gallery (by $GET) in this example - "showroom"
so i do
$SQL = "SELECT * FROM pictures WHERE galleryname = '$GET[galnam]'";
so far it is okey.
i also have variable $_GET[activepicture], which contains id of picture
and i need somehow check if this $_GET[activepicture] is first picture or last in gallery "showroom" or somewhere in the middle.
if $GET[activepicture] is first in gallery then i could echo next button
if $GET[activepicture] would be last then i could echo just prev button
if somewhere in middle then both prev and next
i also need somehow assign values to links prev next that points to previous or next picture in gallery?
can somebody help me please, thanks!