-
Notifications
You must be signed in to change notification settings - Fork 1
/
create_account.html
110 lines (102 loc) · 3.34 KB
/
create_account.html
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
</head>
<nav class="navbar navbar" style="color:black">
<div class="container-fluid">
<!--Home-Header button of navbar -->
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#topNavBar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="index.html" style="color:white">NeXtflix</a>
</div>
</div>
</nav>
<style>
body {
background-color: black;
background-repeat: no-repeat;
}
.navbar{
font-family: Avenir;
border-radius: 0;
}
h2 {
font-family: Avenir;
color: white;
margin-left: 5%;
}
p{
font-family: Avenir;
color: white;
margin-left: 5%;
}
input{
font-family: Avenir;
color: black;
}
select{
font-family: Avenir;
color: black;
}
</style>
<body>
<h2>Welcome to NeXtflix!</h2>
<form action="create_user.php" method="post">
<div id="invalid" style="display: none;">
<font color="red">That username is taken, please enter another one. </font>
</div>
<p>First Name: <input type="text" name="first_name" required id="first_name"/></p>
<p>Last Name: <input type="text" name="last_name" required id="last_name"/></p>
<p>Email: <input type="text" name="email" required id="email"/></p>
<p>Username: <input type="text" name="username" required id="username"/></p>
<p>Password: <input type="password" name="password" required id="password"/>
<p>Your Favorite Genre:
<select name="fav_genre">
<option value="Comedy">Comedy</option>
<option value="Horror">Horror</option>
<option value="Action">Action</option>
<option value="Drama">Drama</option>
<option value="Sci-Fi/Fantasy">Sci-Fi/Fantasy</option>
</select>
</p>
<p> <input type="checkbox" name="consent" value="checked" required> I am at least 13 years old. </p>
<input type="Submit" style="margin-left:5%">
</form>
<script type = "text/javascript">
var taken = getCookie("usernametaken");
if(taken){
togglediv(taken);
}
function togglediv(taken) {
var x = document.getElementById('invalid');
if(taken == 'taken'){
x.style.display = "block";
}
else{
x.style.display = "none";
}
}
function getCookie(cname) {
var name = cname + "=";
var decodedCookie = decodeURIComponent(document.cookie);
var ca = decodedCookie.split(';');
for(var i = 0; i <ca.length; i++) {
var c = ca[i];
while (c.charAt(0) == ' ') {
c = c.substring(1);
}
if (c.indexOf(name) == 0) {
return (c.substring(name.length, c.length));
}
}
return "";
}
</script>
</body>
</html>