Change image and text when buttom is clicked

I have a very simple application. a database with 2 fields: image and text. the page displays the image and text. when I click on the button it must load image 2 and text2, when I click on the button it must load image 3 and text3 and so on. how can I do? can I select the image from the db? thanks a lot

You need to index your records, or if you don’t mind the order search them in to a group with text and image fields set to parent groups thing.
then add a custom state to the parent group called Index.
create your search on the group: Search for image’s (sort by index number) :item number groups index (custom state)

Then create 2 buttons which add and subtract from the custom state respectively.