I am developing a web application and created a Login page using HTML. The back-end is MySQL. Already established connection with the database using connection string and able to fetch data from MySQL(Through java program). I have to compare the entered username and password values with those in users table(MySQL). How can i get these entered values inside the java classes(where the database connection is established)
$(document).ready(function() {
$('#submit').click(function() {
var userValue = document.getElementById('nameuser').value;
var passValue = document.getElementById('passid').value;
$.ajax({
//code
});
});
});
how can I achieve user authentication in such a scenario? Hoping this can be achieved with jQuery and Ajax. Needless to say, I am an amateur in Java and related technologies.