Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page language="java" contentType="text/html; charset=windows-1255"
- pageEncoding="windows-1255"%>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <jsp:useBean id="db" class = "JDBC.ForDataBase"/>
- <!-- equals to "JDBC.ForDataBase db=new JDBC.ForDataBase()" -->
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
- <title>select</title>
- </head>
- <body style="background-image: url(background.jpg);">
- <jsp:include page="menu.jsp"></jsp:include>
- <h2><font color="green">Show Member's Details </font></h2>
- <form action="selectForMember.jsp" method="post">
- <font color="black">Name: <input type="text" id="username" name="username"></font>
- <font color="black">Password: <input type="text" id="password" name="password"></font>
- <input type="submit" value="submit"></form>
- <%
- if(request.getMethod().equals("POST"))
- {
- String username=request.getParameter("username");
- String password=request.getParameter("password");
- String result[][] = db.select("select * from gmembers where username='"+username+"' and password='"+password+"'");
- %>
- <table border="2" bordercolor="red" align="center" bgcolor="gold" width="80%" height="100">
- <tr>
- <th>firstname</th>
- <th>lastname</th>
- <th>email</th>
- <th>username</th>
- <th>password</th>
- <th>age</th>
- </tr>
- <tr>
- <%
- int j,i;
- for(i=0;i<result.length;i++)
- {
- out.println("<tr>");
- for(j=0;j<result[i].length;j++)
- {
- out.println("<td>"+result[i][j]+"</td>");
- }
- out.println("</tr>");
- }
- }
- %>
- </tr>
- </table>
- <form method="get" action="main.html"><button type="submit" style="background-color:lightblue;font-weight: bold;">back to main</button></form>
- </body>
- </html>
Add Comment
Please, Sign In to add comment