Page 1 of 2

Login Script to match Username/Password in MySQL database table

Posted: Mon Jan 18, 2016 9:21 pm
by Ed

I have connected to a MySQL database through API Express. The MySQL table contains user info (name, address, username, password, etc..).

When App user enters Username & Password in Login page on my App I would like to check the MySQL table records for a match. If there is a match, then user is directed to a page on the App. If no match, then login error message.

Is there a script to check for a match?

Thank you in advance.


Login Script to match Username/Password in MySQL database table

Posted: Tue Jan 19, 2016 10:22 am
by Serhii Kulibaba

Hello Ed,

You can use simple MySQL query "SELECT", and check result on the event success. If server's response is empty - user is not found, else - user signed-in successfully.


Login Script to match Username/Password in MySQL database table

Posted: Tue Jan 19, 2016 5:21 pm
by Ed

Thank you Sergiy!

Would you happen to have a sample script that I can follow? Thanks.


Login Script to match Username/Password in MySQL database table

Posted: Tue Jan 19, 2016 7:31 pm
by Julian De La Rosa

Just use the mapping to hold


Login Script to match Username/Password in MySQL database table

Posted: Tue Jan 19, 2016 7:35 pm
by Ed

Don't quite follow.

Hopefully, Sergiy has a sample script that I can use.


Login Script to match Username/Password in MySQL database table

Posted: Wed Jan 20, 2016 1:55 pm
by Serhii Kulibaba

Please look at this example of using SQL requests: https://devcenter.appery.io/documenta...


Login Script to match Username/Password in MySQL database table

Posted: Wed Jan 20, 2016 6:43 pm
by Ed

Thanks Sergiy.

I was able to setup the SQL SELECT query. Thanks!

How would I go about doing the following? Do I need a script?

"check result on the event success. If server's response is empty - user is not found, else - user signed-in successfully"


Login Script to match Username/Password in MySQL database table

Posted: Thu Jan 21, 2016 5:02 pm
by Ed

Hello Sergiy,

After setting up the SQL SELECT query through API Express what is the next step to validate Login? Can you provide the steps. Will I need a script? If so, do you have an example? Thanks.


Login Script to match Username/Password in MySQL database table

Posted: Fri Jan 22, 2016 8:46 am
by Ed

Hello,

Can you provide a sample JAVASCRIPT for Login Validation to use on my App login page (that will validate Usernames & Passwords stored in MySQL Database)? Thanks.


Login Script to match Username/Password in MySQL database table

Posted: Sun Jan 24, 2016 9:05 pm
by bb78520

I am following this thread and would like to see more details as well