I have the following source:
$('#loginnow').click(function() {
var login_useroremail = $('input[name="login_useroremail"]').val();
var login_password = $('input[name="login_password"]').val();
$.ajax({
type: "POST",
url: "http://www.example.com/login.php",
data: {
login_useroremail: login_useroremail,
login_password: login_password
},
dataType: 'text',
success: function(data) {
if(data == 'ok')
{
alert('Registration successful!');
}
else
{
alert('Registration failed. Try again later.');
}
},
error: function(data) {
alert('Registration failed. Try again later.');
}
});
});
I know that these warnings and conditions are unpleasant, but since I am in an early state of the project, I will clarify this later .;) I work with jQuery, jQuery Mobile and PHPTAL.
When I call the example and the login really succeeded (= the server returns "ok"), all this is finde.
My question is: Why, when I call the example and the login is not satisfied, are parameters automatically added to my URL bar? After the call, it looks like this:
www.example.com/index.php?user=blah&pw=yadda&...
Sometimes it also has a binding like
www.example.com/index.php
At least I can imagine what it is for, I think it helps to remember what you are doing now in the mobile application.
source
share