-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadduser.html
More file actions
80 lines (64 loc) · 2.92 KB
/
adduser.html
File metadata and controls
80 lines (64 loc) · 2.92 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<!--Roxanne Low -->
<!--COM 214 Final Project -->
<!--Spring 2017-->
<!DOCTYPE html>
<!-- Demonstrates how to add a user to an existing database -->
<html>
<head>
<a href="index.php"> <img src="logo.png" style="width: 250px; height:250px;margin:auto; display:block"></a>
<title> U.N.I.T.E.D </title> <link ref="stylesheet" href="main.css">
</head>
<body style="text-align:center; margin:75px;background-color: floralwhite;">
<br><br>
<div class="registration">
<table align="center">
<tr>
<td><label>Name:</label></td>
<td><input type="text" id="username" name="username" placeholder="roxanneL" required /><br></td>
</tr>
<tr>
<td><label>Password: </label></td>
<td><input type="password" id="password" name="password" placeholder="Password" required /><br></td>
</tr>
<tr>
<td><label>Email: </label></td>
<td><input type="text" id="email" name="email" placeholder="plow@conncoll.edu" required /><br></td>
</tr>
<tr>
<td><label>Telephone: </label></td>
<td><input type="number" id="telephone" name="telephone" placeholder="1(823)123-1223" required /><br></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
<td><button onclick = "getProfile()">Register</button></td>
</tr>
</table>
</div>
<script>
function getProfile(){
xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function() {
if (xmlhttp.readyState == 4 && xmlhttp.status == 200){
//alert("You succcessfully registered to join the community!");
document.getElementById("output").innerHTML = xmlhttp.responseText;
}
};
var str = "adduser.php?";
str += "username=" + document.getElementById("username").value;
str += "&password=" + document.getElementById("password").value;
str += "&email=" + document.getElementById("email").value;
str += "&telephone=" + document.getElementById("telephone").value.toString();
console.log(str);
xmlhttp.open("GET",str,true);
xmlhttp.send();
}
</script>
<p>
For better communication, a real name is preferred. <br>If you have concerns about your privacy, use your first name or a nickname. <br>
Telephone number is visible only to registered users of this site. </p><br>
<a href="login.php">Back to Login page</a>
<div id = 'output' style="text-align:center;color:red;font-style: italic""></div>
</body>
</html>