• This is the first question I’m asking here, so I’m open to any feedback on how to clarify my problem/question!

    I have created a small javascript game on a wordpress page with “custom html”. I’d like to save the highscores in a table under the game canvas that does not reset when one reloads the page. In an attempt to achieve that I have created a table with columns “name” and “score” in a MySQL database (where the wordpress tables of my website are as well).

    When the game is over I’d like to insert the highscore into the database table and retreive the highscores from the database and display them in a highscore list.

    I have tried using php and sql queries in the “custom html” block, but it does not seem to work. I think I have insufficient knowledge on how to run php scripts in WordPress. I have read about “wpdb” but I could not make it work with that either. In addition I have searched for plugins that could do the trick, but no success so far.

    If anyone has an idea on how to create the highscore list I have in mind I’d love to hear about it, because so far my hours of research and trial/error have had no succes!

    • Dit onderwerp is gewijzigd 4 jaren, 4 maanden geleden door gideon4324.
1 reactie aan het bekijken (van in totaal 1)
1 reactie aan het bekijken (van in totaal 1)
  • Het onderwerp ‘Insert and display data in database from WordPress page’ is gesloten voor nieuwe reacties.