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"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
- <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=windows-1255">
- <link rel="stylesheet" type="text/css" href="Style.css">
- <title>Database Usage</title>
- </head>
- <body>
- <img src="${pageContext.request.contextPath}/images/pen.jpg" height = "500px" width = "1000px" align = "middle"/>
- <a name="home"></a>
- <ul>
- <li><a href="#">Home</a></li>
- <li><a href="#news">News</a></li>
- <li><a href="ContactUs.jsp">Contact</a></li>
- <li><a href="#about">About</a></li>
- <li><a href="Signup.jsp">Sign Up</a></li>
- </ul>
- <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
- url="jdbc:mysql://localhost/userdb"
- user="root" password="Royboy007"/>
- <sql:query dataSource="${snapshot}" var="result">
- SELECT * FROM members where user ='<%=session.getAttribute("user")%>';
- </sql:query>
- <sql:update dataSource="${snapshot}" var="update">
- UPDATE members SET user = "<%= request.getParameter("uname") %>" , pass = "<%= request.getParameter("pass") %>",email = "<%= request.getParameter("mail") %>" , wallet = "<%= request.getParameter("wallet") %>" where user = "<%= session.getAttribute("user") %>";
- </sql:update>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement