Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>PayRoll</title>
- </head>
- <body>
- <%@ page import="java.sql.*" %>
- <%@ page import="java.io.*" %>
- <%@ page import="java.util.*" %>
- <%@ page import="java.*" %>
- <h1 align="center">Pay Roll</h1>
- <div>
- Month: <select name="month">
- <option value="select" selected>--Select--</option>
- <option>JAN</option>
- <option>FEB</option>
- <option>MAR</option>
- <option>APR</option>
- <option>MAY</option>
- <option>JUN</option>
- <option>JUL</option>
- <option>AUG</option>
- <option>SEP</option>
- <option>OCT</option>
- <option>NOV</option>
- <option>DEC</option>
- </select>
- Year : <input type="text"/>
- <br/><br/><br/><br/><br/>
- Employee Code:<select name="empcode">
- <option value="select" selected >--Select--</option>
- <%
- Connection con = null;
- try
- {
- Class.forName("com.mysql.jdbc.Driver").newInstance();
- con= DriverManager.getConnection("jdbc:mysql://127.0.0.1:3306/payroll","root","");
- }
- catch(Exception e){
- System.out.println(e.getMessage());
- }
- String sqlString = "SELECT * from employee";
- Statement stmt = con.createStatement();
- ResultSet rs = stmt.executeQuery("SELECT * from employee");
- while ( rs.next() ) {
- out.println( rs.getString("code"));
- }
- rs.close();
- %>
- </select>
- </div>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement