Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <script runat="server">
- </script>
- <head runat="server">
- <script src="userValidate.js"></script>
- <title></title>
- <link type="text/css" rel="stylesheet" href="StyleSheet.css" >
- </head>
- <body>
- <div id="header">
- <h1>Suncoast High School Guidance Department</h1>
- </div>
- <div id="nav">
- <a style="text-decoration: none; color: black;" id = "home" href="Default.aspx">Home</a><br />
- <a style="text-decoration: none; color: black;" id = "login" href="Login.aspx">Login</a><br />
- <a style="text-decoration: none; color: black;" id = "Ask a Question" href="Ask a Question.aspx">Ask a Question</a><br />
- <a style="text-decoration: none; color: black;" id = "FAQs" href="FAQs.aspx">FAQs</a><br />
- <a style="text-decoration: none; color: black;" id = "Search" href="Search.aspx">Search</a><br />
- <a style="text-decoration: none; color: black;" id = "General Info" href="General Info.aspx">General Info</a><br />
- </div>
- <form id="form1" runat="server">
- <div id="section">
- <h1>Sign Up</h1>
- <form id="studentInfo">
- First Name:<br>
- <input type="text" id="fname"><br>
- Last Name:<br>
- <input type="text" id="lname"><br>
- Email:<br>
- <input type="text" id="email"><br>
- <input type="submit" value="Submit" onclick="doSomething()" id="studentInfoSubmit">
- </form>
- </form>
- </body>
- <script>
- function doSomething() {
- var fname = document.getElementById('fname').value;
- var lname = document.getElementById('lname').value;
- var email = document.getElementById('email').value;
- alert("First Name: " + fname + "\nLast Name: " + lname + "\nEmail: " + email)
- }
- </script>
- </html>
- function userValidation()
- {
- alert("you have made an account, please login");
- var userName = document.form1.username.value;
- var email = document.form1.Email.value;
- alert(email);
- var password = document.form1.password.value;
- alert(userName + email + password);
- var foundError = false;
- if (username == "") {
- foundError = true;
- document.getElementById("usernameError").innerHTML = "Username is required.";
- }
- else {
- document.getElementById("passwordError").innerHTML = "  ";
- }
- if (email == "") {
- foundError = true;
- document.getElementById("emailError").innerHTML = "Email is required.";
- }
- else if (email.indexOf("@") == -1) {
- foundError = true;
- document.getElementById("emailError").innerHTML = "Email must contain an @ symbol.";
- document.form1.Email.value = "";
- }
- else {
- document.getElementById("emailError").innerHTML = " ";
- }
- if (password == "") {
- foundError = true;
- document.getElementById("passwordError").innerHTML = "Password is required.";
- }
- else {
- document.getElementById("passwordError").innerHTML = "  ";
- }
- if (foundError) {
- return false;
- }
- else {
- return true;
- }
- }
- var connection = new ActiveXObject("ADODB.Connection");
- var connectionstring = "Data Source=localhost\SQLEXPRESS;Initial Catalog=Senior Project NK;Integrated Security=SSPI";
- var DSHtest = String;
- connection.Open(connectionstring);
- var rs = new ActiveXObject("ADODB.Recordset");
- rs.Open("SELECT * FROM dbo.Issues", connection);
- rs.
- rs.MoveFirst
- rs.find(password);
- DSHtest = rs.fields(1).value;
- while (!rs.eof) {
- document.write(rs.fields(1));
- rs.movenext;
- }
- rs.close;
- connection.close;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement