Click here to Skip to main content
15,913,685 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
html5rocks.webdb.searchUsers = function (username,password){
var db = html5rocks.webdb.db;
db.transaction(function (tx) {
tx.executeSql("SELECT * FROM users WHERE username=? AND password=?", [username,password], function (tx, results) {
var len = results.rows.length, i;
var user = document.getElementById("username");
var pd = document.getElementById("password");
for ( i = 0; i < len; i++)
if(results.rows.item(i).username == user.value && results.rows.item(i).password == pd.value){
alert("logged in");
self.location.href = "login.html";
}
else{
alert("access denied");
}


});
});
}
Posted
Comments
Shah Parth P 21-Apr-14 1:09am    
Please make your Question title as clear as possible so that others can get interest.
and provide the concise information without redundancy

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900