I feel that this question might be pretty elementary, but I have no doubt someone here can help educate me. Basically what I have made is a simple web application that generates a random photo and accompanying text for someone when they click a button (a random funny tarot reading; everything is stored in the mysql database). Currently the page does not display any URL relating to the database row that is displayed. Everything simply appears within index.php.
The issue is that I would like people to be able to share these on social media, so the one they receive becomes what is shared (instead of just the index.php page where everything is generated). An obvious solution, which I have considered, is to simply display the result according to its id (for example, the url would be http://mysite.com/entry.php?id=17).
The issue, though, is that I also don’t want people to simply be able to go into the browser and change the id number so they can just look through all of the entries in order by changing the id number. I would like everything to remain random.
The other reason I want to display them somehow individually is so I can ultimately add comments functionality or ratings for each specific entry.
My question, then: is there any simple way to change the url of the results so there is no manual searching? I hope I have been able to articulate what my problem/aim is here. I am more than happy to clarify anything that doesn’t make sense.