I am trying to check if the user is successfully logged in. here is my code:
[CODE]“loginUser.php”,
{
username: $(“#username”).val(), password: $(“#password”).val()
},
function(data){
$(“#loginStats”).html(data);
var success = (data == true ? $(‘#login’).html(‘<img src=images/loader.gif width=16 height=16 /> Now taking you to the member area…’) : $(‘#login’).html(‘<img src=”images/red_x.png” width=”24″ height=”24″ /> Invalid Login.’));
if(success) {
}
}
loginUser.php
[CODE]foreach($_GET as $key => $value) {
$get[$key] = $value;
}
$username = $get[‘username’];
$password = $get[‘password’];
if(!empty($username) && !empty($password)) {
return true;
} else {
return false;
}
}
i enter values for both fields, but it is still returning false – invalid login. why?