I have one file with a long script which has a variable "period" in it. I will send the value of that variable via the front page of the site to that file. The value will be filled into the file and return it to the front page.
So I want the code <code period="x">
placed in the front page as something like <code period="1">
I want to do that multiple times with different values. Does someone know how this can be done?
I saw this script, but it didn't work:
if($error === false) {
alert($error);
$.ajax({
url: '\get.php',
type: 'POST',
dataType: "json",
data: {
period: "1"
},
success: function(data){
alert(JSON.stringify(data));
}
});
Thanks