Unable to perform any PHP operations in an Ajax application

My Ajax application was working fine, until I implemented an if statement in the PHP script... then like a contagious disease it seems that if I do anything to the data in PHP it returns nothing back to the Javascript layer.All I can do is echo the data back...For instance the query string I'm sending to the PHP reads...\[code\]index.back3.php?form=login&json={"email":"[email protected]","password":"asdasdfas"}\[/code\]and I know its getting there because in the simplest debugging PHP file (index.back3.php) that I created all I have is a simple echo statement... and it never fails to send back the data to the Javascript file.when index.back3.php reads \[code\]<?php echo $_GET[json]; ?>\[/code\]the alert that I have triggering off in the javascript reliably spits out the json string.also when it reads\[code\]<?php echo $_GET[form]; ?>\[/code\]when I get any more complicated than that nothing comes back to the javascript. Even a simple concatenation...\[code\]<?php echo ($_GET[form] . $_GET[json]); ?>\[/code\]...returns nothing!A simple if...else statement also returns nothing.\[code\]<?php if(!isset($_GET[form]) { echo "no!"; } else { echo "yes!"; }?>\[/code\]And this important operation also...\[code\]<?php $array = json_decode($GET[json], true); var_dump($array);?>\[/code\]returns nothing.OK... so just to make sure everything is above board here is my Ajax output function in the Javascript layer.\[code\]function responseAjax() { if (myRequest.readyState == 4) { if(myRequest.status == 200) { var foo = myRequest.responseText; alert(foo); } else { alert("An error has occured: " + myRequest.statusText); } }}\[/code\]Can someone please explain what's going on? I'm truly stumped.
 
Back
Top