forked from sriram1998/Ecell-community
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
241 lines (226 loc) · 11.6 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
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
<!doctype html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.2/jquery.min.js"></script>
<title>Ecell community</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"/>
<link rel = "stylesheet" type="text/css" href="form.css">
<link rel = "stylesheet" href = "https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" />
<meta name="viewport" content="width=device-width, initial-scale=1">
</head>
<style>
</style>
<body>
<div class = "container-fluid">
<div class = "center" id="response">
<form id="myForm" class = "ecellSignup" method = "post">
<div class = "row center">
<div class = "col-xs-12">
<h1>E-CELL REGISTRATION</h1>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="name">NAME:</label>
<input type="text" id="name" name="name" placeholder="Your name:" class = "ecellInput" required="required">
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="dob">DATE OF BIRTH</label>
<input type="date" name="dob" min="1979-12-31" id="dob" class = "ecellInput" required="required">
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="gender">GENDER:</label>
<div class = "row">
<div class = "col-xs-4">
<b>Male</b><i class="fa fa-mars" aria-hidden="true"></i>
<input type="radio" id="male" name="gender" value="male" checked required="required">
</div>
<div class = "col-xs-4">
<b>Female</b><i class="fa fa-venus" aria-hidden="true"></i>
<input type="radio" id="female" name="gender" value="female" required="required">
</div>
<div class = "col-xs-4">
<b>Other</b><i class="fa fa-transgender-alt" aria-hidden="true"></i>
<input type="radio" id="other" name="gender" value="other" required="required">
</div>
</div>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="roll number">ROLL NUMBER:</label>
<input type="text" id="rollNum" name="rollNum" class = "ecellInput" required="required">
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="email">EMAIL:</label>
<input type="email" id="email" placeholder="Email" class = "ecellInput" name = "email" required="required">
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="phoneNum">Phone number:</label>
<input type="text" id="phoneNum" name="phoneNum" class = "ecellInput" required="required">
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for="dept">DEPARTMENT:</label>
<select name="dept" placeholder="department" id="dept" required="required">
<option value="CSE">CSE</option>
<option value="ECE">ECE</option>
<option value="EEE">EEE</option>
<option value="MECH">MECH</option>
<option value="ICE">ICE</option>
<option value="CIVIL">CIVIL</option>
<option value="CHEM">CHEM</option>
<option value="PROD">PROD</option>
<option value="META">META</option>
<option value="DOMS">DOMS</option>
<option value="OTHER">OTHER</option>
</select>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q1">On a scale of 1-10, how much do you read about entrepreneurship?</label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q1" id = "q1" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q1">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q2">On a scale of 1-10, how much do you know about start-ups?</label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q2" id = "q2" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q2">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q3">On a scale of 1-10, how much do you know aboutbusiness models? </label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q3" id = "q3" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q3">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q4">On a scale of 1-10, how much do you know about investments related to start-ups? </label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q4" id = "q4" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q4">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q5">On a scale of 1-10, rate your knowledge on the various resources provided by our college for starting up?</label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q5" id = "q5" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q5">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q6">On a scale of 1-10, how likely are you to startupin college? </label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q6" id = "q6" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q6">6</p>
</div>
</div>
<div class = "row">
<div class="col-xs-12">
<label for = "q7">On a scale of 1-10, how likely are you to start-up in life?
</label>
</div>
</div>
<div class = "row">
<div class="col-xs-6">
<input type = "range" name = "q7" id = "q7" min = "1" max = "10" onchange = "change(this)"/>
</div>
<div class="col-xs-6">
<p id = "p_q7">6</p>
</div>
</div>
<input type="submit" value="Register" class = "btn btn-block submitBtn" id="submit">
</form>
</div>
</div>
<script>
$('#submit').click(function(e){
var flag = true;
var data = $('form').serializeArray();
if(data[0].value.length == 0) {
flag = false;
alert("Please enter your name");
}
else if (data[1].value.length == 0) {
flag = false;
alert("Please enter the date of birth dd-mm-yyyy");
}
else if (data[2].value.length == 0) {
flag = false;
alert("Please enter a gender");
}
else if (data[3].value.length != 9) {
flag = false;
alert("Please Enter a valid 9 digit roll number");
}
console.log(data);
e.preventDefault();
$.ajax({
type: "POST",
url: "register.php",
data: {name: data[0].value,dob:data[1].value,gender:data[2].value,rollNum:data[3].value,email:data[4].value,phoneNum:data[5].value,dept:data[6].value,q1:data[7].value,q2:data[8].value,q3:data[9].value,q4:data[10].value,q5:data[11].value,q6:data[12].value,q7:data[13].value},
success: function(data){
$('#response').html(data);
},
fail: function(data){
$('#response').html('There is an error!');
}
});
});
function change(buttonControl) {
var arr = buttonControl.name;
var id = "p_q" + arr.substr(1, 4);
document.getElementById(id).innerHTML = buttonControl.value;
}
</script>
</body>
</html>