Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <%@ page import="java.io.*,java.util.*,java.sql.*"%>
- <%@ page import="javax.servlet.http.*,javax.servlet.*" %>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%>
- <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
- pageEncoding="ISO-8859-1"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <link rel="stylesheet" type="text/css" href="cssForTopBar.css">
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
- <title>Insert title here</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;
- </sql:query>
- <sql:update dataSource="${snapshot}" var="insert">
- INSERT INTO members (F_name, L_name, email, username, password) VALUES ('<%= request.getParameter("fname") %>', '<%= request.getParameter("lname") %>', '<%= request.getParameter("email") %>', '<%= request.getParameter("uname") %>', '<%= request.getParameter("pass") %>');
- </sql:update>
- <%
- response.sendRedirect("SQLHomePageLogin.jsp");
- %>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement