I was wondering if it is possible to use a server-side scripting language, php preferable, to automate the change of a value, in this case a number.
JS FILE (sample):
var whatIsShowingNow = 2;
function showChange(integral) {
//code is written
}
and when calling it,
showChange(2);
The sample above which uses the Jquery framework, has the number 2
for the variable/function whatIsShowingNow
and showChange
for example.
The idea is that I want to have the automation of changing it to 3
after 14 days for example, then 4
14 days after that, and so on.
After some research it came to my understanding that changing the .js file to a .php file may assist in its editing/changing, but not quite sure, in A) its practicality and B) if its in good practice.
So is it possible to automate the value of a javascript variable and function to a specific timer on the server? Or, is there a better way of going around this?
I can just edit the value manually, but in dealing with a lot of code I was wanting something that could automate the change.
Thanks in advance for any assistance.