An option, similar in its idea, to Solution 1 (Richard Deeming) is to use (learn) php. PHP is a server side language. It can do two things that are useful to your problem.
It can edit files (that are also on the server side - not on the client)
It can store data and share it between pages (in what are called SESSION variables).
You can learn it, from the ground up and without any pain, here.
Besides the ability to customize pages you send to users, you'll be able to access databases like MySQL, SQL, etc.