Advertisement
GameNCode

User Info + Updater JSP

Mar 19th, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.03 KB | None | 0 0
  1. <%@ page language="java" contentType="text/html; charset=windows-1255" pageEncoding="windows-1255"%>
  2. <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
  4. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  5. <html>
  6. <head>
  7. <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
  8. <title>Signup</title>
  9. <link rel="stylesheet" type="text/css" href="Style.css">
  10. </head>
  11. <body>
  12. <img src="${pageContext.request.contextPath}/images/pen.jpg" height = "500px" width = "1000px" align = "middle"/>
  13. <a name="home"></a>
  14. <div>
  15. <h1>Welcome to our Pen Sale Site!!!!!</h1>
  16. <form id="signup" action="updater.jsp" method="get">
  17. <ul>
  18. <li><a href="#">Home</a></li>
  19. <li><a href="#news">News</a></li>
  20. <li><a href="ContactUs.jsp">Contact</a></li>
  21. <li><a href="#about">About</a></li>
  22. <li><a href="Signup.jsp">Sign Up</a></li>
  23. </ul>
  24. <sql:setDataSource var="snapshot" driver="com.mysql.jdbc.Driver"
  25. url="jdbc:mysql://localhost/userdb"
  26. user="root" password="Royboy007"/>
  27. <sql:query dataSource="${snapshot}" var="result">
  28. select * from members where user ='<%=session.getAttribute("user")%>';
  29. </sql:query>
  30. <hr>
  31. <c:forEach var="user" items="${result.rows}">
  32.  
  33. <c:out value="${user.user}" />
  34. <br>
  35. <c:out value="${user.pass}" />
  36. <br>
  37. <c:out value="${user.email}" />
  38. <br>
  39. <c:out value="${user.wallet}" />
  40. <br><br>
  41. </c:forEach>
  42. <b>
  43. If you would like to change your info:
  44. </b>
  45. <br>
  46. <form id="updater" action="updater.jsp" method="get">
  47. Username: &nbsp; <input type="text" name="uname" placeholder="New Username"><br>
  48. Password: &nbsp; <input type="password" name="pass" placeholder="New Password"><br>
  49. Email: &nbsp; <input type="email" name="mail" placeholder="example@email.com"><br>
  50. Funds: &nbsp; <input type="number" name="wallet" placeholder="0" min="1" max="100000"><br>
  51. <br>
  52. <input type="submit">
  53. <input type="reset" value="Reset">
  54. </form>
  55. </div>
  56. </body>
  57. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement