Need help with images please

hi, i need help with JS code for images.

I have four folders and each folder has one images, let say ( images-one.jpg, images-two.jpg, images-three.jpg, images-four.jpg).

now,in index.php page there are four buttons, each buttons for each images.

if i clicked button numer two for images-two.jpg, and then it will show that images name from that folder in index.php page.

and then if i reload same index.php page or refreshed same page, i want to show SAME images that I clicked before which is images-two.jpg.

how can i write that code to show images from four files, each files are in each folder.

is there is website where i can learn about this case!

please help me thanks.

AM

Hi Andy,

I think server-side code would be better equipped to do that.

e.g. have the buttons send index.php?button=1
And then load the info with PHP depending on the button clicked.

All the best,