Random picture with corresponding data from database on a dynamic page

Thank you both, guys! That was helpful, I used your cleaned code, Dima. And if I check it correctly it already contains the corrections, you mentioned, Kristof. But still this will be probably to complicated for me to solve as I cannot find the part which is wrong. Image appears randomly, but the other items are not linked to the randomly shown image in accordance to the database.:disappointed_relieved: