Good morning I am Anna. I am an artist and have a website with my drawings and would like to make a button that can randomly open a new page after it is pressed.
I am a noobie at this. I can put any file in the root directory of my website for example if I will create a file called random.php what code should I put there so the button that is placed on my html pages randomly selects urls from that random.php
I just need a simple code, nothing complicated so I can just add or remove pages from random.php file whenever I need. Thank you for your time.
Just expanding on the post by @donboe
“URL1” would be replaced with “/i/boredButton.png” but in your case @AnnaRosendale it could be a webpage and not an image depending how you have things setup.
If you have a lot of pages it might be easier to have them in one directory so that you can build the array of pages automatically This means you do not need to edit the php every time you add a new page.