Last active
August 30, 2016 08:32
-
-
Save r-winkler/fa891a0670170649cb8c702e7342bb30 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
String email = request.getParameter("email"); | |
String password = request.getParameter("password"); | |
String sql = "select * from users where (email ='" + email +"' and password ='" + password + "')"; | |
Connection connection = pool.getConnection(); | |
Statement statement = connection.createStatement(); | |
ResultSet result = statement.executeQuery(sql); | |
if (result.next()) { | |
loggedIn = true; | |
// # Successfully logged in and redirect to user's profile page | |
} else { | |
// # Auth failure - Redirect to Login Page | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment