Yuvalxp8 icon

Login Check (Using MySQL)

Yuvalxp8 | PRO | 04/04/17 07:30:29 PM UTC | 0 ⭐ | 14966 👁️ | Never ⏰ | []
ASP |

1.2 KB

|

None

|

0 👍

/

0 👎

<%@ 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>

Comments

  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎

    
        
  •  icon
    01/01/70 12:00:00 AM UTC
    Plain Text |

    0 B

    |

    👍

    /

    👎