Keeping score

akquizzes.free.nf

Hi Folks
very simple site with no real problems other than I can’t get it to save the scores on the server rather than locally on the user’s pc as it does currently, nobody else can see the updated scores.

I’d much rather it updated the index file as my code tries to do but on the server so that anyone can see the scores by going to the site or refreshing. Using Mysql for 5 scores seems a bit overkill, not that I know how to do it… is there any other way of making this happen?

I’m a bit naive when it comes to modern website design!!

many thanks

MagicPhil

there are many ways to do this

infinityfree can run php code so thats a good place to start

I would probably avoid rewriting index and instead write your scores to its own html formatted file then have your index.php display this score file using the include command

2 Likes

Thank you, I’ll look into this! As I say, my old time html skills aren’t up to modern methods!!

Personally, I would use MySQL with PHP for this. Yes, there are only a few things, but it would be much simpler to code, maintain, and scale.

Loading time really would not be affected too much either.

3 Likes

I would also use MySQL for this. Generating a HTML file also works for very simple use cases, but if you’re ever in a position where you have multiple concurrent players who may both write scores at the same time, it will be very hard to keep it consistent.

4 Likes

Thank you, I’m pretty much convinced of the MySql route now!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.