-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
94 lines (77 loc) · 1.7 KB
/
signup.php
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
<script language="javascript">
function validation(){
var usertype= document.frm.type.value;
var stindex=document.frm.index_no.value;
var password= document.frm.password.value;
var password2=document.frm.confirmpassword.value;
if(usertype=="Student"){
if(stindex.length<5){
alert('Please type the student index number');
return false;
}
}
else if (password.length<5){
alert ("Password too short");
return false;
}
else if(password!=password2){
alert("password mismatch");
return false;
}
return true;
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
td {padding: 15px;}
.SignUp{margin:100px 0px 0px 200px;}
.head{background-color:#09F; font-size:18px;height:100px}
</style>
<title>sign Up</title>
</head>
<body>
<div class="head">
<h1>Online Marks Entry System</h1>
</div>
<div class="SignUp">
<form method="POST" name="frm" action="signupdata.php" onSubmit="return validation()">
<table >
<tr>
<td>Name:</td>
<td><input type="text" name="Name" size=40></td>
</tr>
<tr>
<td>User Name:*</td>
<td><input type="text" name="UN" size=40></td>
</tr>
<tr>
<td>Password:*</td>
<td><input type="password" name="password" size=40></td>
</tr>
<tr>
<td>Confirm Password:*</td>
<td><input type="password" name="confirmpassword" size=40></td>
</tr>
<td>User Type:*</td>
<td><select name="type">
<option>Lecturer</option>
<option>Student</option>
</select>
</td>
<tr>
<td>If student enter Student Index Number</td>
<td><input type="text" name="index_no" size=40></td>
</tr>
<tr>
<td>Email:</td>
<td><input type="text" name="Email" size=40 /></td>
</tr>
<tr>
<td><input name="cmd" type="submit" value="SignUp" ></td>
</tr>
</table>
</form>
</div>
</body>
</html>