-
Notifications
You must be signed in to change notification settings - Fork 0
/
signup.php
144 lines (138 loc) · 4.04 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
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>New user signup </title>
<link rel="stylesheet" href="css/bootstrap.min.css"/>
<script language="javascript">
function check()
{
if(document.form1.lid.value=="")
{
alert("Plese Enter Login Id");
document.form1.lid.focus();
return false;
}
if(document.form1.pass.value=="")
{
alert("Plese Enter Your Password");
document.form1.pass.focus();
return false;
}
if(document.form1.cpass.value=="")
{
alert("Plese Enter Confirm Password");
document.form1.cpass.focus();
return false;
}
if(document.form1.pass.value!=document.form1.cpass.value)
{
alert("Confirm Password does not matched");
document.form1.cpass.focus();
return false;
}
if(document.form1.name.value=="")
{
alert("Plese Enter Your Name");
document.form1.name.focus();
return false;
}
if(document.form1.address.value=="")
{
alert("Plese Enter Address");
document.form1.address.focus();
return false;
}
if(document.form1.city.value=="")
{
alert("Plese Enter City Name");
document.form1.city.focus();
return false;
}
if(document.form1.phone.value=="")
{
alert("Plese Enter Contact No");
document.form1.phone.focus();
return false;
}
if(document.form1.email.value=="")
{
alert("Plese Enter your Email Address");
document.form1.email.focus();
return false;
}
e=document.form1.email.value;
f1=e.indexOf('@');
f2=e.indexOf('@',f1+1);
e1=e.indexOf('.');
e2=e.indexOf('.',e1+1);
n=e.length;
if(!(f1>0 && f2==-1 && e1>0 && e2==-1 && f1!=e1+1 && e1!=f1+1 && f1!=n-1 && e1!=n-1))
{
alert("Please Enter valid Email");
document.form1.email.focus();
return false;
}
return true;
}
</script>
<link href="quiz.css" rel="stylesheet" type="text/css">
</head>
<body class="bg-success">
<?php
include("header.php");
?>
<table width="100%" border="0">
<tr>
<td width="132" rowspan="2" valign="top"><span class="style8"><img src="images/connected_multiple_big.jpg" width="131" height="155"></span></td>
<h1 class="text-center bg-primary">REGISTRACTION PAGE</h1>
</tr>
<tr>
<td><form name="form1" method="post" action="signupuser.php" onSubmit="return check();">
<center>
<img class="img-circle" src="2.jpg" width="240px" height="190px" border="1" />
</center> <br>
<table class=" table table-striped">
<tr>
<td class="style7">LOGIN ID</div></td>
<td><input class="form-control"type="text" name="lid"></td>
</tr>
<tr>
<td class="style7">Password</td>
<td><input class="form-control"type="password" name="pass"></td>
</tr>
<tr>
<td class="style7" >Confirm Password </td>
<td><input class="form-control" name="cpass" type="password" id="cpass"></td>
</tr>
<tr>
<td class="style7">Name</td>
<td><input class="form-control" name="name" type="text" id="name"></td>
</tr>
<tr>
<td valign="top" class="style7">Address</td>
<td><textarea class="form-control" name="address" id="address"></textarea></td>
</tr>
<tr>
<td valign="top" class="style7">City</td>
<td><input class="form-control" name="city" type="text" id="city"></td>
</tr>
<tr>
<td valign="top" class="style7">Phone</td>
<td><input class="form-control" name="phone" type="text" id="phone"></td>
</tr>
<tr>
<td valign="top" class="style7">E-mail</td>
<td><input class="form-control" name="email" type="text" id="email"></td>
</tr>
<tr>
<td> </td>
<td><input class="btn btn-danger" type="submit" name="Submit" value="Signup">
</td>
</tr>
</table>
</form></td>
</tr>
</table>
<p> </p>
</body>
</html>