-
Notifications
You must be signed in to change notification settings - Fork 1
/
signup2.php
124 lines (110 loc) · 2.81 KB
/
signup2.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
<!doctype html>
<html>
<head>
<title>
sign up
</title>
<link rel="stylesheet" type="text/css" href="css/signup.css">
<script>
function validateForm() {
var x = document.forms["myForm"]["name"].value;
if (x == "")
{
alert("Name must be filled out");
return false;
}
var x = document.forms["myForm"]["email"].value;
var atpos = x.indexOf("@");
var dotpos = x.lastIndexOf(".");
if (atpos<1 || dotpos<atpos+2 || dotpos+2>=x.length) {
alert("Not a valid e-mail address");
return false;
}
var z = document.forms["myForm"]["contact"].value;
if (z == "")
{
alert("Contact Number must be filled out");
return false;
}
var p = document.forms["myForm"]["username"].value;
if (p == "")
{
alert("Username must be filled out");
return false;
}
var x = document.forms["myForm"]["password"].value;
if (x == "")
{
alert("password must be filled out");
return false;
}
var x = document.forms["myForm"]["password_check"].value;
if (x == "")
{
alert("Confirm password must be filled out");
return false;
}
var q = document.forms["myForm"]["password"].value;
var r = document.forms["myForm"]["password_check"].value;
if(q!=r){
alert("Passwords do not match");
return false;
}
}
</script>
</head>
<body>
<?php
include 'nvgbar.php';
?>
<br><br>
<div class="formstyle">
<center>
<h1>Sign Up Now!<span>It is completely free and will take less then 30 Seconds!!</span></h1>
</center>
</div>
<form method="post" action="signuppost.php" class="signup" name="myForm" onsubmit="return validateForm();">
<fieldset class="account-info">
<label>
Your Name
<input type="text" name="name">
</label>
<label>
Gender<br>
<select name="gender">
<option value="male" >Male</Option>
<option value="female">Female</Option>
<option value="other">Other</Option>
</select>
</label>
<label>
Email
<input type="text" name="email">
</label>
<label>
Contact Number
<input type="text" name="contact">
</label>
<label>
Username
<input type="text" name="username">
</label>
<label>
Password
<input type="Password" name="password">
</label>
<label>
Confirm Password
<input type="Password" name="password_check">
</label>
</fieldset>
<fieldset class="account-action">
<input class="btn" type="submit" name="submit" value="SignUp">
</fieldset>
</form>
<br><br>
<?php
include 'footer.php';
?>
</body>
</html>