Advertisement
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"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
- <link rel="stylesheet" type="text/css" href="Style.css">
- <title>Checker</title>
- </head>
- <body>
- <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
- url="jdbc:mysql://localhost/usersinfo"
- user="root" password="Slnm1855"/>
- <sql:query dataSource="${snapshot}" var="result">
- select * from members where username ='${param.uname}';
- </sql:query>
- <c:choose>
- <c:when test="${param.pass==result.rows[0].password}">
- <%session.setAttribute("user", request.getParameter("uname")); %>
- <%session.setMaxInactiveInterval(-1); %>
- <%response.sendRedirect("SQLloginSuccess.jsp"); %>
- </c:when>
- <c:otherwise>
- <%response.sendRedirect("SQLloginFail.jsp"); %>
- </c:otherwise>
- </c:choose>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement