I have a question that you will probably be able to answer in a snap, though it has been a constant issue of mine for over a day.
With my PHP script, I produce a variable
When I try to use this variable in my AJAX script, this is the result being sent to my server -
checkStatus.php ?information1
Now, as far as I can see, that isn't supposed to happen, its supposed to send the contents of the variable "informatio n1".
This is my script for the AJAX
this is the currentData variable -
the number variable is just 1.
To sum this message up -
The way I wrote the "currentDat a" variable, is it correct? If not, what is the correct way of writing it, and if it is, do you have any idea why AJAX is sending "informatio n1" as text instead of a variable?
Any help is appreciated as always, thank you in advance!
With my PHP script, I produce a variable
Code:
var information1 = 'ip=127.0.0.1&port=80';
checkStatus.php ?information1
Now, as far as I can see, that isn't supposed to happen, its supposed to send the contents of the variable "informatio n1".
This is my script for the AJAX
Code:
$.ajax({
url:'inc/checkStatus.php',
data: currentData,
type: "GET",
cache: false,
Code:
var currentData = "information" + number;
To sum this message up -
The way I wrote the "currentDat a" variable, is it correct? If not, what is the correct way of writing it, and if it is, do you have any idea why AJAX is sending "informatio n1" as text instead of a variable?
Any help is appreciated as always, thank you in advance!
Comment