Click here to Skip to main content
15,892,161 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I'm creating a registration page for my web project and I need it to connect to a database. I'm not sure how to get it running. I've researched it, however, I can not seem to figure it out yet. I'm having great trouble and I'm trying to find a solution before tomorrow's deadline.

Also, once this is figured out, I'm going to have trouble getting it to connect with a login page that I need as well. I'm unsure of what I'm doing and I need some direction please.

What I have tried:

So far, this is what I have tried.

Registration.html

<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">

</head>

<body>
<h1>Register Here</h1>
<p>Please feel free to register to our website. </p>
<hr>
<form action="answers.jsp" mthod="post">

First Name:<br>
<input type="text" name="userfirstname" required><br>

Last Name:<br>
<input type="text" name="userlastname" required><br>

Email:<br>
<input type="email" name="useremail" required><br>

Password(Must be 6 characters or more):<br>
<input type="password" name="userpassword" required><br>

<input type="submit" name="submitregistration"><br>
</form>
</body>

</html>

Answers.jsp

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html lang="en">

<head>

<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
</head>

<body>
<h1>Success!</h1>
<p>Thank you for registering! </p>
<hr>

First Name: <%String firstN=request.getParameter("userfirstname");%> <%= firstN%>
<br>
<br>

Last Name: <%String lastN=request.getParameter("userlastname");%> <%= lastN%>
<br>
<br>

Email: <%String email=request.getParameter("useremail");%> <%= email%>
<br>
<br>

Password: <%String pass=request.getParameter("userpassword");%> <%= pass%>
<br>
<br>
<button onclick="Return()">Return</button>
<script>
function Return() {
window.history.back();
}
</script>
</body>

</html>
Posted
Updated 21-Mar-17 10:19am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900