Hi i am trying to retrieve a user from a database based on the username and password entered and then if the user exists i then go to the next page,i am using one function and global variables..what is giving me a problem is that i want to use the form data before executing the validate function..please help
var db = openDatabase('AudreyTeracore', '1.0', 'Company Registration DB', 2 * 1024 * 1024);
var nameContent = new Array(); // now it's global!
var passwordsArray = new Array();
var nameT=document.getElementById("username").value;
var passwordT=document.getElementById("password").value;
db.transaction(function(tr){
tr.executeSql("select UserName,Password From UserLogin Where UserName='"+nameT+"' And Password ='"+passwordT+"' ", [],
Validate if record exists in a database websql
in JavaScript
Posted
Hi i am trying to retrieve a user from a database based on the username and password entered and then if the user exists i then go to the next page,i am using one function and global variables..what is giving me a problem is that i want to use the form data before executing the validate function..please help