Seems to work, could be improved for sure.
I think you're overestimating my php-knowledge: I have no idea what to do with this

it would be much faster to send individual request to the database (e.g. by GET).
If you tell us the structure of the database, it is actually super easy to implement.
I don't have a database, just static HTML. That makes it very fast to browse as the server just has to read the file from disk, but I'm also at the point that adding more functionality becomes exceedingly difficult. I know nothing about databases and php

Np, I will write an example script based on your .txt.
Database details for such functionalities would have to be provided by btct admin anyways.
Will adjust the script now ...