Welcome Guest, Not a member yet? Register   Sign In
Controller is firing but I can't get the $_GET
#1

I am sending a request to my CI program from a remote javascript program running in a browser. The call on the javascript client is 
Code:
           var xhr = new XMLHttpRequest();                
           xhr.onerror = function() { alert('error'); };
        xhr.addEventListener ("load", reqListener);
        xhr.open('GET', 'http://localhost/Subit_backend/register', true);  //used .htdaccess in apache server to modify the injection of index.php as per CI forum 3/17/18
           myArray["email"]=jsonResponse["email"];
        var json = JSON.stringify(myArray);
        document.onreadystatechange = function () {
        if (xhr.readyState===1)
            {
            xhr.send(json);
            }
           
          }
On the server side I have 

PHP Code:
  public function register()
 
   {
 
   if (isset($_GET["email"])) {
 
   
        
}
 
   
The controller fires and I have a breakpoint on the if (isset()) line. But isset never seems to catch the $_GET["email"]; it always fails. I am actually sending over three data items from the client in myArray, the email address, the Latitude and the longitude. How can I see what buffer is being received by the controller? Is there anything obvious I am missing?
proof that an old dog can learn new tricks
Reply


Messages In This Thread
Controller is firing but I can't get the $_GET - by richb201 - 03-21-2018, 06:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB