You need a PHP script/function that will look into a file and return the value. (That's readscores.php in Ize's example)
The corresponding AJAX call points to the script and you use AJAX.getlastdata to know the value that is stored on your server side.
Then you need another script/function to which you pass a parameter on call and that will store said parameter as value of the stored variable. (That's post.php in Ize's example).
The corresponding AJAX call points to the URL of the script with your parameter added to it.
What you want pretty much lies already in Ize's example
For the PHP itself, it is out of the scope of C2.
It is a "classic" coding language and you need to learn its basics to be able to modify the scripts to your need.
It's not overly complicated, but it takes time to get used to.
Open the .php files in a notepad (you can use a specific notepad like notepad++ or devphp to profit from syntax highlight which helps getting a better understanding of the code once used to it).
The lines that starts with // are comments. They explain the logic of the following code.
To learn PHP a good place to start is the w3school
. You can also go directly to the official manual
of PHP (translated in many languages) and learn directly from the source.
This is all very technical but PHP as been around for quite a long time and I'm pretty sure you can google something like "PHP for dummies" (in reference to the book
that you might also buy. It has a good reputation of popularization of such technical domains).
If you're low on budget you can always keep googling until you find a PHP beginner tutorial (up to date by all means) that suits you.
You wanted ressources, here they are.
It is possible to propose some key in hand solution/PHP framework that would be usable "easily".
The drawback to this would be the limit of customization applyable to the framework and the time it would require to get built. Another concern could be security issues and the need for a regular maintaining of said framework.
In the end it is a safer bet for the users (especially the younger ones) to learn directly PHP and be able to write their own scripts fully adapted to their needs.
Moreover such knowledge of a coding language IS profitable in C2 since it helps getting used to arrays and loops and other common expressions/functions/designs.Kyatric2011-11-13 04:32:05