want to check if this password exist in database then open homepage

db.transaction((tx) => { const sql = SELECT * FROM userRegister WHERE user_name='${userName}'; tx.executeSql(sql, [], (tx, results) => { const len = results.rows.length; if (!len) { alert('This account does not exist!'); } else { const row = results.rows.item(0); if (userPassword === row.userPassword) { navigation.navigate('Main', { username }); return; } alert('Authentication failed!'); } }); }); }



Read more here: https://stackoverflow.com/questions/67012537/want-to-check-if-this-password-exist-in-database-then-open-homepage

Content Attribution

This content was originally published by Yusra Masood at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: