So here is the ajax call that is making the problem
$.ajax({
type: "POST",
url: "src/login.php",
dataType: "JSON",
data: {username: usr, password: pwd},
success: function(json){
loggedStatus=json.status;
alert(json.status);
}
});
It is succesfully passing the variables to the php file, but it isn't entering th success: part. This is example of what the php file returns
{
"status": "Wrong"
}
or
{
"status": "154414707fe8d22bb6239648ce11a9c9bede1a3e"
}
Which is totaly fine.