I am relatively new to web development and I am currently working on a website that features a leaderboard. The goal is to allow users to input the number of points they have earned since their last log-in, with this value being added to their existing score, and have the leaderboard update accordingly.
While I already have the leaderboard in place and functioning smoothly, complete with point values as predefined variables within the code, I am facing a challenge when it comes to integrating user inputs into the system. I am struggling to figure out how to dynamically update the user's point total based on their input, ensuring that the change reflects not only on their end but also for all other users once they refresh the page.
At present, the log form resides on a separate .html subpage compared to the leaderboard, but shares the same .js file. I am open to relocating the log form to a modal pop-up on the main page if necessary.
I briefly explored PHP as a solution, but unfortunately, my hosting platform (Neocities) does not support PHP.
My initial attempt involved using the following snippet:
pointValue = pointValue + inputtedValue;
However, this did not lead to the desired outcome of updating the main page...
I have researched similar queries on Stack Overflow, and one suggestion that stood out recommended storing the value in the computer's memory to retain it even after refreshing or closing the browser. Nevertheless, I'm unsure how this method would facilitate an updated value visible to users accessing the site from different devices.