How to: Pull random string to wordpress, refreshed by button click?
-
I’m looking for a way to take a random line from either a txt file or mySQL database (or third option?) and display on a website. Instead of getting a new line on every page refresh, I would like it to refresh on it’s own at the click of a button.
Here’s an example of my idea, in case that’s a help for anyone.
Imagine a question like “How should I travel?”, and a button that says “Give me an idea”, then at every click you get a fine random line – “Car”, “Boat”, “Plane”, “Flying Bowl of Ceral” and so on.
I would prefer any way that’s using the least resources of the server, and if possible a way to keep people from getting access to all the lines.
I hope someone can help me. ??
Thanks,
Jonas.
- The topic ‘How to: Pull random string to wordpress, refreshed by button click?’ is closed to new replies.