This ajax thing im working on is not doing what i tell it to do.
On the client JS side I alert everything that is sent through the request, and on the PHP side I print out everything that it receives. These two lists of variables are not the same. I do not understand why.
Here how I am sending the data (over post):
xhr.onreadystatechange = response;
xhr.open("POST", self.url, true);
xhr.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xhr.setRequestHeader("Content-length", data.length);
xhr.setRequestHeader("Connection", "close");
xhr.send(data);
if(self.ALERT_SENT_DATA)
{
alert("sending this to " + self.url + ":\n" + data);
}
and the alert looks like this: (everything is zero except for type, permissionid, and permission)
sending this to workers/permission.php:
type=save&permissionid=2&permission=1&info=0&users=0&pages=0&menus=0
&toolmanager=0&contributors=0¤tissue=0&backup=0&features=0&issues=0&ast=0
&research=0&sports=0&milestones=0&sportslist=0&crusher=0&permission=0&info=0
&users=0&pages=0&menus=0&toolmanager=0&contributors=0¤tissue=0&backup=0
&features=0&issues=0&ast=0&research=0&sports=0&milestones=0&sportslist=0&crusher=0
On the PHP side I can always get the variables type and permissionid. Those 2 always work and i do not know why. THere isnt anything special about those two except they are first. However everything else after permissionid ALWAYS comes up zero. No matter what the javascript tells me it sent, everything comes up zero on the PHP.
So how can I get into this and figure out where my problem is?