SHARE
TWEET

Untitled

a guest Apr 27th, 2018 155 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <%@ page language="java" import="java.sql.*"%>
  2.  
  3. <%        
  4.     try {
  5.         Class.forName("com.mysql.jdbc.Driver");
  6.            Connection myConnection = DriverManager.getConnection(
  7.              "jdbc:mysql://devsrv.cs.csbsju.edu:3306/???","???", "???");
  8.  
  9.         Statement stmt=myConnection.createStatement();
  10.         String queryString = "Select * from employee where lname='"+request.getParameter("lname")+"' and ssn='"+request.getParameter("ssn")+"'";
  11.         //out.println(queryString);
  12.         ResultSet rs = stmt.executeQuery(queryString);
  13.         if(!rs.next())
  14.             response.sendRedirect("Login.html");
  15.         else{
  16.            out.println(rs.getString(1));
  17.            out.println(rs.getString(2));
  18.            out.println(rs.getString(3));
  19.            out.println(rs.getString(4));
  20.            out.println(rs.getString(5));
  21.            out.println(rs.getString(6));
  22.            out.println(rs.getString(7));
  23.            out.println(rs.getString(8));
  24.            out.println(rs.getString(9));
  25.            out.println(rs.getString(10));}
  26.     } catch (Exception E) {
  27.             E.printStackTrace();
  28.         }
  29. %>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top