now im not a an ajax genius, but i DID manage to see 1 error u made:
change:
Code:
function Authenticate(){
//Read Cookies
var Username = readCookie('Username');
var Password = readCookie('Password');
var AuthLevel = readCookie('AuthLevel');
var response = "FALSE"
var url="db/getuser.php";
var params="username=" + Username + "&password=" + Password
xmlhttp.onreadystatechange=function () {
if (xmlhttp.stateChange==4) {
if (xmlhttp.status==200) {
var sString = xmlhttp.responseText;
var sArray = new Array();
//Split the returned string
sArray = sString.split(",");
response = sArray[0];
}
}
}
xmlhttp.open("POST",url,true);
//Send the proper header information along with the request
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.send(params);
return response;
}
to:
Code:
function Authenticate(url){
//Read Cookies
var Username = readCookie('Username');
var Password = readCookie('Password');
var AuthLevel = readCookie('AuthLevel');
var response = "FALSE"
var url="db/getuser.php";
var params="username=" + Username + "&password=" + Password
xmlhttp.onreadystatechange=function () {
if (xmlhttp.stateChange==4) {
if (xmlhttp.status==200) {
var sString = xmlhttp.responseText;
var sArray = new Array();
//Split the returned string
sArray = sString.split(",");
response = sArray[0];
}
}
}
xmlhttp.open("POST",url,true);
//Send the proper header information along with the request
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.setRequestHeader("Content-length", params.length);
xmlhttp.setRequestHeader("Connection", "close");
xmlhttp.send(params);
return response;
}
call authenticate like this man:
Code:
<script>Authenticate('webpage.html');</script>
Hope that helps! 
Good luck! 
~SI~
Bookmarks