-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
179 lines (140 loc) · 4.96 KB
/
index.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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
<!DOCTYPE html>
<html >
<head>
<meta charset="UTF-8">
<title>Sign-Up/Login Form</title>
<link href='http://fonts.googleapis.com/css?family=Titillium+Web:400,300,600' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<div class="form">
<ul class="tab-group">
<li class="tab active"><a href="#signup">Sign Up</a></li>
<li class="tab"><a href="#login">Log In</a></li>
</ul>
<div class="tab-content">
<div id="signup">
<h1>Sign Up for Course Enrollment</h1>
<form action="register.php" method="post">
<div class="top-row">
<div class="field-wrap">
<label>
First Name:<span class="req">*</span>
</label>
<input type="text" required autocomplete="off" name="fname" id="fname"/>
</div>
<div class="field-wrap">
<label>
Last Name:<span class="req">*</span>
</label>
<input type="text" name="lname" id="lname" required autocomplete="off"/>
</div>
</div>
<div class="field-wrap">
<label>
Gender:
</label>
<input id="gender" list="gend" name="gender">
<datalist id="gend">
<option value="m">Male</option>
<option value="f">Female</option>
</datalist>
</div>
<div class="field-wrap">
<label>
Department:<span class="req">*</span>
</label>
<input id="department" list="departments" required autocomplete="off" name="department">
<datalist id="departments">
<option value="All">All Departments</option>
<option value="CS">CS-Computer Science</option>
<option value="CE">CE-Computer Engineering</option>
<option value="ACCI">ACCI-Accounting</option>
<option value="AHSI">AHSI-Art History</option>
<option value="BIOL">BIOL-Biology</option>
<option value="BUAN">BUAN-Business Analytics</option>
<option value="ITM">ITM-IT Management</option>
</datalist>
</div>
<div class="field-wrap">
<label>
Contact Number:<span class="req">*</span>
</label>
<input type="text" name="contact" id="contact" required autocomplete="off"/>
</div>
<div class="field-wrap">
<label>
Email Address:<span class="req">*</span>
</label>
<input type="email"required autocomplete="off" name="email" id="email"/>
</div>
<div class="field-wrap">
<label>
Set A Username:<span class="req">*</span>
</label>
<input type="text"required autocomplete="off" name="username" id="username"/>
</div>
<div class="field-wrap">
<label>
Set A Password<span class="req">*</span>
</label>
<input type="password"required autocomplete="off" name="password" id="password"/>
</div>
<button type="submit" id = "button" class="button button-block"/>Get Started</button>
</form>
</div>
<div id="login">
<h1>Welcome Back!</h1>
<form action="auth.php" method="post">
<div class="field-wrap">
<label>
Username: <span class="req">*</span>
</label>
<input type="text"required autocomplete="off" name="username" id="username"/>
</div>
<div class="field-wrap">
<label>
Password<span class="req">*</span>
</label>
<input type="password"required autocomplete="off" name="password" id="password"/>
</div>
<button class="button button-block"/>Log In</button>
</form>
</div>
</div><!-- tab-content -->
</div> <!-- /form -->
<script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script>
<script src="js/index.js"></script>
<script type="text/javascript">
$( document ).ready(function() {
$('#username').change(function(){
$.ajax({
url: "checkUser.php",
data: { username: $('#username').val() },
type: "GET",
context: document.body,
success: function(result){
if($.trim(result) == "1"){
alert("Record for this username already exists");
}
}
});
});
$('#email').change(function(){
$.ajax({
url: "checkEmail.php",
data: { email: $('#email').val() },
type: "GET",
context: document.body,
success: function(result){
if($.trim(result) == "1"){
alert("Record for this email already exists");
}
}
});
});
});
</script>
</body>
</html>