<%@ include file="popup.html" %>
<%@ page import="java.sql.*" %> <% String useremail=request.getParameter("useremail");System.out.println("1"); String userpass=request.getParameter("userpass");System.out.println("11"); try{ if(useremail.equals("admin") && userpass.equals("admin")){%> <%} else{ Class.forName("oracle.jdbc.driver.OracleDriver");System.out.println("111"); Connection con=DriverManager.getConnection("jdbc:oracle:thin:@localhost:1521:xe","classified","classified");System.out.println("1111"); String query="select * from registered where email=? and password=?";System.out.println(useremail); PreparedStatement ps=con.prepareStatement(query);System.out.println(userpass); ps.setString(1,useremail); ps.setString(2,userpass);System.out.println("3"); ResultSet rs=ps.executeQuery();System.out.println("4"); System.out.println("5"); if(rs.next()){ int id=rs.getInt(1);System.out.println(id); session.setAttribute("userid",Integer.valueOf(id));System.out.println("7"); session.setAttribute("islogin","true");System.out.println("8"); %> <%@ page autoFlush="true" buffer="1094kb"%> <% } else{System.out.println("11"); out.print("

Sorry username or password error!

"); %>

Advertified

<% }} }catch(Exception e){e.printStackTrace();} %> <%@ include file="footer.html"%>
www.000webhost.com