I have code to check username and password in test.php file.
But when I am calling this ajax it is always showing alert of wrong username and password.
Can anyone tell where I am going wrong?
$.ajax({
type: "GET",
url: 'http://externalurl/external/test.php',
contentType: "text/html",
data: 'uname=' + uname + '&pass=' + pass,
success: function (data) {
if (data == 'success') {
alert('success');
} else {
alert('Wrong user name and password.Please try again');
}
}
});
datawhich will cause problems on certain characters. Usedata: {uname: uname, pass: pass}instead!data: {uname: uname, pass: pass}but still same problem