hm, stll always returns false, even if i fill in values, or set values in the loginUser.php page...
here is my code for each page:
Code:
$.get
(
"loginUser.php",
{
username: $("#username").val(), password: $("#password").val()
},
function(data){
$("#loginStatus").html(data);
var success = (data == true) ? '<img src="images/ajax-loader.gif" width="16" height="16" /> Valid Login! Now taking you to the members area...' : '<img src="images/red_x.png" width="24" height="24" /> Invalid Login. Please try again.';
$('#loginContainer').html(success);
if(success) {
// do something here, like log them in - update db, set cookies, and redirect
}
}
)
Code:
<?php
include 'db_connect.php';
$username = $_GET['username'];
$password = $_GET['password'];
if(!empty($username) && !empty($password)){return true;}
else{return false;}
?>
Bookmarks