I made a very simple image gallery, with a Next and Preview button. My content is generated dynamicly so i have dynamic URLS
<a href="content.php?id=<?php echo $row['id'] -1; ?>" ><div id="next">Next </div></a>
<a href="content.php?id=<?php echo $row['id'] +1; ?>" ><div id="prev">Prev </div></a>
Everything is work fine, but when I hit the “Next” button on my last image or the preview button on my first image, I got a blank page, beacause there are no more records in the database. So i need an IF statement.
Example: If (no more records) echo ‘error’ else echo ‘some message’
Thank you
I do not know if this makes sense to you. I hope I understood your question. I did not see another answer. If its not let me know and I will delete my response by adding a note to your question.
Also as: