0 Replies Latest reply on Aug 23, 2016 12:45 AM by sawank18707653

    Authenticate user from server in phonegap

    sawank18707653 Level 1

      I want to authenticate user from server but when I send a request to the server, I get an error. Also, on the server, I have columns "phone" and "name" from where I want to authenticate a user. Please tell me what I am doing wrong.

       

      $(".signupbtn").click(function()

        {

        var Mobile=$("#Mobile").val();

        var key=$("#key").val();

       

       

       

        $.ajax

        ({

        type: "POST",

        url: "url.php",

        data:  {Mobile: Mobile, key :key},

        crossDomain: true,

        cache: false,

       

       

        success: function(data)

        {

        if(data=="success")

        {

       

        window.location.assign = "index.html";

        }

        else

        {

        alert("error");

        $(".signupbtn").html('error');

        }

        }

        });

       

        return false;

        });