This is a pretty long question in words, but it all adds up to one function.
For some time, I have tried figuring out how to increment a variable, save it and then display it. Only problem is I figured out that to save the variable and allow all users on the website to see the same updated variable, it has to be saved server side, so now I have a big question as I have tried to figure out one thing, and now has to do it another way.
To store a variable server side, is it enough to save the variable in a .php script because if so, I think what I am looking for is a way to have a variable in a .php script, then when a specific function is called I want to increment this variable by one, and then last I want to save this variable server side, to always be able to have the exact same variable on all users screens. The .php script is called by a form from the html script, so there is no problem there, the problem is as mentioned above, how to make a variable in .php script, increment that variable when a function is called, save that variable and then pass it back to the html page to display.