Now that you have added md5 encoding make sure your DB reflects this.
I see you are trying to go to another page with $(document.location = "members.php");
I didn't enclose that, but I did fix the jq ajax:
Use this
Code:
<script type="text/javascript">
$(document).ready(function() {
$("#login").click(function(){
var username=$("#username").val();
var password=$("#password").val();
$.post("loginpost.php",
{
username:username,
password:password
},
function(data,status){
$('.errors').html(data);
});
});
});
</script>