It is necessary to check: is there a user in the WebSQL database with a login and password entered? The problem is that the data that is in the database is not at the request. How to fix? Maybe something is wrong? I attach the code below:

(function () { var submitButton = document.getElementById("submitButton"); submitButton.addEventListener('click', submitButtonHandler); function submitButtonHandler(event) { event.preventDefault(); var inputLogin = document.getElementById("login"); var inputPassword = document.getElementById("password"); db = openDatabase("usersDB", "0.1", "A list of users", 100); if(!db) {alert("Failed to connect to database."); } db.transaction(function (tx) { tx.executeSql("SELECT COUNT(*) FROM usersDB", [], function (result) {alert("aaaa")}, function (tx, errror) {alert("qqqq")}); }) } })(); 
  • And this query does not work from JS code: SELECT COUNT(*) FROM usersDB ? Do you have the database name coincides with the table, there is no typo? What do you get as a result? What error code or message? You inputLogin and inputPassword not used in the query, by the way. The query is a simple selection of the number of entries in the usersDB table. - Denis Bubnov
  • Give the same code for creating a database or upgrading its version, where the usersDB table is usersDB - Mike

0