skip to Main Content

Else statement's code is also printing even though if statement is true – Mysql

This is the code: <% try { String enteredOtp = request.getParameter("otps"); String actualOtp = (String) session.getAttribute("OTP"); if (enteredOtp.equals(actualOtp)) { String eemail = (String)session.getAttribute("eemail"); Connection con; Class.forName("com.mysql.jdbc.Driver"); con = DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql","root","12345"); Statement stm = con.createStatement(); String m = "select * from empinfo…

VIEW QUESTION
Back To Top
Search